Phase 2 of building a Claude Managed Agent
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. Use…
--- name: stage-launch 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). version: 2.11.2 author: Alireza Rezvani license: MIT tags: [cma, launch, payloads, curl, byok, api-key-safety, environment, agent, session] compatible_tools: [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
Overview
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.
Manual install (npx, ZIP)
npx skills add alirezarezvani/claude-skills --skill stage-launch -g -a claude-codemkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \
| tar -xz -C ~/.claude/skills --strip-components=3 claude-skills-19392f7a0826/agent-launcher/skills/stage-launchNew-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/081415a4cb0341871b6b/stage-launch.zip" -OutFile "$env:TEMP\stage-launch.zip"; Expand-Archive "$env:TEMP\stage-launch.zip" -DestinationPath "$HOME\.claude\skills" -ForceConnects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md3.8 KBREADME.md1.0 KBscripts/3 files · 15.2 KB
Read the files here
alirezarezvani/
Show the full text77 lines
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 |
Details
- Version
- 2.11.2
- Updated
- Aug 30, 2026
- License
- MIT
- Stars on the repo
- ★ 26,349
- Checked
- Source
- alirezarezvani/claude-skills ↗
- Creator
- alirezarezvani · 363 listings
Similar skills
See all →
SkillTurn the current project website into a short, polished/brag
SkillTurn a project directory or a website URL into a short/brag-slim
SkillPlan, build and quality-check a premium short commercialBusiness motion film
SkillLaunch your AI product to global attentionAI Product Launch Playbook
SkillBuild motion graphics and launch videos in codeMotion os
SkillBuild a 30-60s motion-graphics launch video for a <YOURBRANDLaunch video creatorMore from alirezarezvani
SkillResume a paused experiment/ar:ar-resume — Resume Experiment
SkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboard
SkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loop
SkillRun a single experiment iteration/ar:run — Single Experiment Iteration
SkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experiment
Skill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberation