# Stage Launch

Use when a managed-agent build sheet is ready to launch ('launch it', 'deploy the agent').

- Repository: https://github.com/alirezarezvani/claude-skills (29114 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add alirezarezvani/claude-skills --skill stage-launch -g -a claude-code -y`
Codex: `npx skills add alirezarezvani/claude-skills --skill stage-launch -g -a codex -y`
Cursor: `npx skills add alirezarezvani/claude-skills --skill stage-launch -g -a cursor -y`
Gemini CLI: `npx skills add alirezarezvani/claude-skills --skill stage-launch -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add alirezarezvani/claude-skills`

## Description

Use when a managed-agent build sheet is ready to launch ('launch it', 'deploy the agent'). Generates and validates API payloads with payload_generator.py and payload_validator.py and writes a resumable curl script with launch_script_writer.py that uses the user's own key.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Phase 2, Stage → Launch

Turn the build sheet into runnable artifacts, then let the founder launch with
their own key. **No script here touches the network or the key**, the user runs
`launch.sh`.

## Workflow

1. **Generate payloads.**
   ```bash
   python3 scripts/payload_generator.py \
     --sheet ./my-agent/build-sheet.json --out-dir ./my-agent
   # -> ./my-agent/payloads/{01-environment,02-agent,03-session,04-kickoff}.json
   ```
   Agent toolset → `always_allow`; every MCP toolset → `always_ask` (baked into
   the agent payload's `permission_policies`).
2. **Write the launch script.**
   ```bash
   python3 scripts/launch_script_writer.py --out-dir ./my-agent
   ```
   `launch.sh` creates environment → agent → session → kickoff **in order**,
   chaining IDs, and **resumes** on re-run (each step skips if its `*.id` file
   exists). It reads `$ANTHROPIC_API_KEY` at runtime.
3. **Validate before launch.**
   ```bash
   python3 scripts/payload_validator.py --dir ./my-agent
   ```
   FAIL blocks, especially a `key_leak` finding. Fix and re-run.
4. **Minimal key step (never in chat).** Check the shell first:
   ```bash
   [ -n "$ANTHROPIC_API_KEY" ] && echo "key present" || echo "export ANTHROPIC_API_KEY=... first"
   ```
   Point the founder to platform.claude.com → API keys. **Never print the key to
   chat, never write it to a file.**
5. **Launch + watch the first poll.**
   ```bash
   export ANTHROPIC_API_KEY=...      # in their shell, not in chat
   ./my-agent/launch.sh
   ```
   Mark checkpoints with Console deep links. Then `goal_state.py set --phase
   grade-iterate` and advance.

## Hard rules (API-key safety)

The rest: https://github.com/alirezarezvani/claude-skills/blob/HEAD/agent-launcher/skills/stage-launch/SKILL.md
