Phase 2 — Stage → Launch
Phase 2 of building a Claude Managed Agent — turn a validated build sheet into exact API payloads and a resumable BYOK curl launch script, then launch (environment → agent → session → kickoff) using the founder's OWN Anthropic key.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/stage-launch, including the files SKILL.md points to. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit alirezarezvani/claude-skills/agent-launcher/skills/stage-launch#main ~/.claude/skills/stage-launchFor one project only, change the path to .claude/skills/stage-launch. This skill also uses payload_generator.py, launch_script_writer.py, launch.sh, payload_validator.py, goal_state.py, cma-primitives.md — copying SKILL.md alone won't be enough. See the folder on GitHub.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of Phase 2 — Stage → Launch
Show the full text77 lines
| name | description | version | author | license | tags | compatible_tools |
|---|---|---|---|---|---|---|
| stage-launch | Phase 2 of building a Claude Managed Agent — turn a validated build sheet into exact API payloads and a resumable BYOK curl launch script, then launch (environment → agent → session → kickoff) using the founder's OWN Anthropic key. Use when the user says "launch it", "deploy the agent", "create the agent now", or when the orchestrator routes phase=stage-launch. payload_generator.py emits the four ordered payloads; launch_script_writer.py writes launch.sh that reads $ANTHROPIC_API_KEY at runtime and never embeds it; payload_validator.py runs a pre-launch check including an API-key-leak scan. No tool in this skill makes network calls — the user runs launch.sh themselves. Distinct from interview (planning) and grade-iterate (the outcome loop). | 2.11.2 | Alireza Rezvani | MIT | [cma, launch, payloads, curl, byok, api-key-safety, environment, agent, session] | [claude-code, codex-cli, cursor, antigravity, opencode, gemini-cli] |
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
- Generate payloads.
Agent toolset →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}.jsonalways_allow; every MCP toolset →always_ask(baked into the agent payload'spermission_policies). - Write the launch script.
python3 scripts/launch_script_writer.py --out-dir ./my-agentlaunch.shcreates environment → agent → session → kickoff in order, chaining IDs, and resumes on re-run (each step skips if its*.idfile exists). It reads$ANTHROPIC_API_KEYat runtime. - Validate before launch.
FAIL blocks — especially apython3 scripts/payload_validator.py --dir ./my-agentkey_leakfinding. Fix and re-run. - Minimal key step (never in chat). Check the shell first:
Point the founder to platform.claude.com → API keys. Never print the key to chat, never write it to a file.[ -n "$ANTHROPIC_API_KEY" ] && echo "key present" || echo "export ANTHROPIC_API_KEY=... first" - Launch + watch the first poll.
Mark checkpoints with Console deep links. Thenexport ANTHROPIC_API_KEY=... # in their shell, not in chat ./my-agent/launch.shgoal_state.py set --phase grade-iterateand advance.
Hard rules (API-key safety)
- The key never enters chat, a file, a payload, or a log.
launch.shreads it from the environment;payload_validator.pyscans forsk-ant-…leaks and FAILs. - Sequential launch. environment → agent → session → kickoff. Watch the first poll foreground before declaring success.
- Resumable. Re-running
launch.shcontinues from the last created ID.
Forcing-question library (recommend + cite)
- "Is the key in your shell env already?" Recommend: check
$ANTHROPIC_API_KEYbefore anything. Cite: this SKILL, key-safety rules. - "Cloud or self-hosted environment?" Recommend: cloud for v0. Cite: cma-primitives.md (environment).
- "Any MCP server in the payload?" Recommend: keep it
always_ask. Cite: cma-primitives.md (permissions). - "Did the first poll return idle/running cleanly?" Recommend: watch it foreground before moving on. Cite: cma-primitives.md (session lifecycle).
Tools
scripts/payload_generator.py— build sheet → 4 ordered API payloads.scripts/launch_script_writer.py— resumable BYOK curl launcher (no key handling).scripts/payload_validator.py— pre-launch check + API-key-leak scan.
| 1 | |
| 2 | name stage-launch |
| 3 | description Phase 2 of building a Claude Managed Agent — turn a validated build sheet into exact API payloads and a resumable BYOK curl launch script, then launch (environment → agent → session → kickoff) using the founder's OWN Anthropic key. Use when the user says "launch it", "deploy the agent", "create the agent now", or when the orchestrator routes phase=stage-launch. payload_generator.py emits the four ordered payloads; launch_script_writer.py writes launch.sh that reads $ANTHROPIC_API_KEY at runtime and never embeds it; payload_validator.py runs a pre-launch check including an API-key-leak scan. No tool in this skill makes network calls — the user runs launch.sh themselves. Distinct from interview (planning) and grade-iterate (the outcome loop). |
| 4 | version 2.11.2 |
| 5 | author Alireza Rezvani |
| 6 | license MIT |
| 7 | tags [cma, launch, payloads, curl, byok, api-key-safety, environment, agent, session] |
| 8 | compatible_tools [claude-code, codex-cli, cursor, antigravity, opencode, gemini-cli] |
| 9 | |
| 10 | |
| 11 | # Phase 2 — Stage → Launch |
| 12 | |
| 13 | Turn the build sheet into runnable artifacts, then let the founder launch with |
| 14 | their own key. **No script here touches the network or the key** — the user runs |
| 15 | `launch.sh`. |
| 16 | |
| 17 | ## Workflow |
| 18 | |
| 19 | **Generate payloads.** |
| 20 | |
| 21 | python3 scripts/payload_generator.py \ |
| 22 | --sheet ./my-agent/build-sheet.json --out-dir ./my-agent |
| 23 | # -> ./my-agent/payloads/{01-environment,02-agent,03-session,04-kickoff}.json |
| 24 | |
| 25 | Agent toolset → `always_allow`; every MCP toolset → `always_ask` (baked into |
| 26 | the agent payload's `permission_policies`). |
| 27 | **Write the launch script.** |
| 28 | |
| 29 | python3 scripts/launch_script_writer.py --out-dir ./my-agent |
| 30 | |
| 31 | `launch.sh` creates environment → agent → session → kickoff **in order**, |
| 32 | chaining IDs, and **resumes** on re-run (each step skips if its `*.id` file |
| 33 | exists). It reads `$ANTHROPIC_API_KEY` at runtime. |
| 34 | **Validate before launch.** |
| 35 | |
| 36 | python3 scripts/payload_validator.py --dir ./my-agent |
| 37 | |
| 38 | FAIL blocks — especially a `key_leak` finding. Fix and re-run. |
| 39 | **Minimal key step (never in chat).** Check the shell first: |
| 40 | |
| 41 | [ -n "$ANTHROPIC_API_KEY" ] && echo "key present" || echo "export ANTHROPIC_API_KEY=... first" |
| 42 | |
| 43 | Point the founder to platform.claude.com → API keys. **Never print the key to |
| 44 | chat, never write it to a file.** |
| 45 | **Launch + watch the first poll.** |
| 46 | |
| 47 | export ANTHROPIC_API_KEY=... # in their shell, not in chat |
| 48 | ./my-agent/launch.sh |
| 49 | |
| 50 | Mark checkpoints with Console deep links. Then `goal_state.py set --phase |
| 51 | grade-iterate` and advance. |
| 52 | |
| 53 | ## Hard rules (API-key safety) |
| 54 | |
| 55 | **The key never enters chat, a file, a payload, or a log.** `launch.sh` reads it |
| 56 | from the environment; `payload_validator.py` scans for `sk-ant-…` leaks and FAILs. |
| 57 | **Sequential launch.** environment → agent → session → kickoff. Watch the first |
| 58 | poll foreground before declaring success. |
| 59 | **Resumable.** Re-running `launch.sh` continues from the last created ID. |
| 60 | |
| 61 | ## Forcing-question library (recommend + cite) |
| 62 | |
| 63 | "Is the key in your shell env already?" *Recommend:* check `$ANTHROPIC_API_KEY` |
| 64 | before anything. *Cite:* this SKILL, key-safety rules. |
| 65 | "Cloud or self-hosted environment?" *Recommend:* cloud for v0. *Cite:* |
| 66 | cma-primitives.md (environment). |
| 67 | "Any MCP server in the payload?" *Recommend:* keep it `always_ask`. *Cite:* |
| 68 | cma-primitives.md (permissions). |
| 69 | "Did the first poll return idle/running cleanly?" *Recommend:* watch it |
| 70 | foreground before moving on. *Cite:* cma-primitives.md (session lifecycle). |
| 71 | |
| 72 | ## Tools |
| 73 | |
| 74 | `scripts/payload_generator.py` — build sheet → 4 ordered API payloads. |
| 75 | `scripts/launch_script_writer.py` — resumable BYOK curl launcher (no key handling). |
| 76 | `scripts/payload_validator.py` — pre-launch check + API-key-leak scan. |
| 77 |
Discussion
Browse more free Claude skills or everything in Product.