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
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/stage-launch, including the files SKILL.md points to.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit alirezarezvani/claude-skills/agent-launcher/skills/stage-launch#main ~/.claude/skills/stage-launch

For 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)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. 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.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of Phase 2 — Stage → Launch

Show the full text77 lines
namedescriptionversionauthorlicensetagscompatible_tools
stage-launchPhase 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.2Alireza RezvaniMIT[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

  1. Generate payloads.
    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.
    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.
    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:
    [ -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.
    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 key never enters chat, a file, a payload, or a log. launch.sh reads it from the environment; payload_validator.py scans for sk-ant-… leaks and FAILs.
  • Sequential launch. environment → agent → session → kickoff. Watch the first poll foreground before declaring success.
  • Resumable. Re-running launch.sh continues from the last created ID.

Forcing-question library (recommend + cite)

  1. "Is the key in your shell env already?" Recommend: check $ANTHROPIC_API_KEY before anything. Cite: this SKILL, key-safety rules.
  2. "Cloud or self-hosted environment?" Recommend: cloud for v0. Cite: cma-primitives.md (environment).
  3. "Any MCP server in the payload?" Recommend: keep it always_ask. Cite: cma-primitives.md (permissions).
  4. "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---
2name: stage-launch
3description: 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).
4version: 2.11.2
5author: Alireza Rezvani
6license: MIT
7tags: [cma, launch, payloads, curl, byok, api-key-safety, environment, agent, session]
8compatible_tools: [claude-code, codex-cli, cursor, antigravity, opencode, gemini-cli]
9---
10 
11# Phase 2 — Stage → Launch
12 
13Turn the build sheet into runnable artifacts, then let the founder launch with
14their own key. **No script here touches the network or the key** — the user runs
15`launch.sh`.
16 
17## Workflow
18 
191. **Generate payloads.**
20 ```bash
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`).
272. **Write the launch script.**
28 ```bash
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.
343. **Validate before launch.**
35 ```bash
36 python3 scripts/payload_validator.py --dir ./my-agent
37 ```
38 FAIL blocks — especially a `key_leak` finding. Fix and re-run.
394. **Minimal key step (never in chat).** Check the shell first:
40 ```bash
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.**
455. **Launch + watch the first poll.**
46 ```bash
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 
631. "Is the key in your shell env already?" *Recommend:* check `$ANTHROPIC_API_KEY`
64 before anything. *Cite:* this SKILL, key-safety rules.
652. "Cloud or self-hosted environment?" *Recommend:* cloud for v0. *Cite:*
66 cma-primitives.md (environment).
673. "Any MCP server in the payload?" *Recommend:* keep it `always_ask`. *Cite:*
68 cma-primitives.md (permissions).
694. "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

Alternatives

Also in Launch planningSee all 277 in Product →
AI Product Launch PlaybookLaunch your AI product to global attention — the playbook behind Manus, Devin, and AFFiNE's breakout launches. Covers AI-specific GTM strategy, hype cycle management, waitlist tactics, and multi-market rollout for maximum day-one impact.Business & ops · MITShipping and launchPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Business & ops · MITLaunch StrategyWhen the user wants to plan a product launch, feature announcement, or release strategy. Also use when the user mentions 'launch,' 'Product Hunt,' 'feature release,' 'announcement,' 'go-to-market,' 'beta launch,' 'early access,' 'waitlist,' 'product update,' 'how do I launch this,' 'launch checklist,' 'GTM plan,' or 'we're about to ship.' Use this whenever someone is preparing to release something publicly. For ongoing marketing after launch, see marketing-ideas. For the offer being launched (bonuses, guarantees, scarcity, naming), see offers.Marketing · MITPacsomaticOperator toolkit for nf-core/pacsomatic matched tumor-normal workflows from BAM inputs. Use this skill when the user needs to validate run inputs, generate pacsomatic-compliant samplesheets, prepare reproducible Nextflow launch artifacts, run locally or submit to schedulers (LSF/Slurm/PBS/SGE), and triage execution failures. Triggers on requests to run pacsomatic, prepare launch commands/scripts, perform dry-run checks, or troubleshoot pipeline startup and scheduler submission errors.Science · MIT