agent-launcher-orchestrator

$npx mdskill add alirezarezvani/claude-skills/agent-launcher-orchestrator

Every session starts with a **goal** — one sentence for one CMA. This orchestrator reads that goal, routes to the right phase, and compiles the goal into a **loop or a workflow**. Heavy intake stays in the forked context; the parent gets a digest.

SKILL.md

.github/skills/agent-launcher-orchestratorView on GitHub ↗
---
name: agent-launcher-orchestrator
description: Use when a user wants to build, launch, grade, or schedule a Claude Managed Agent (CMA) in their own Anthropic account — "build me an agent", "launch this as a managed agent", "run this on a schedule", "grade my agent against a rubric", "set up a nightly worker". Reads the per-session goal (./my-agent/goal.json), routes deterministically to one of five phase sub-skills (interview → stage-launch → grade-iterate → run-without-you → wrap-up) via goal_router.py, and compiles the goal+phase into an execution shape (single-pass workflow / bounded grade→iterate loop / recurring cron deployment loop) via loop_compiler.py. Forks context so heavy intake (build sheets, payloads, eval cases) stays out of the parent thread. All launches are emitted as BYOK curl the user runs with their own key; no tool makes API calls. Inspired by anthropics/launch-your-agent (Apache-2.0). Distinct from engineering/agent-harness (generic domain loop) and engineering/write-a-skill (authors Claude Code skills, not CMAs).
context: fork
license: MIT
metadata:
  version: 2.11.2
  author: Alireza Rezvani
  tags: [claude-managed-agents, cma, agent, launch, orchestrator, session-goal, loop, workflow, cron, outcome, byok]
  compatible_tools: [claude-code, codex-cli, cursor, antigravity, opencode, gemini-cli]
---

# agent-launcher — Domain Orchestrator

Every session starts with a **goal** — one sentence for one CMA. This orchestrator
reads that goal, routes to the right phase, and compiles the goal into a **loop or
a workflow**. Heavy intake stays in the forked context; the parent gets a digest.

Inspired by Anthropic's `launch-your-agent` reference skill (Apache-2.0). This is
an independent re-implementation; CMA semantics come from
[`../../references/cma-primitives.md`](../../references/cma-primitives.md).

## The through-line: the session goal

State lives at `./my-agent/goal.json` (the user's folder). Manage it with
`goal_state.py` (init / set / status / advance) — it also backs the `/cs-goal`
command and the opt-in `SessionStart` hook. The goal's `phase` selects the lane;
the phase + recurrence selects the loop shape.

## Routing (deterministic)

Run the router, then act on its exit code:

```bash
python3 scripts/goal_router.py --out-dir ./my-agent
# exit 0 ROUTE  -> fork to the named phase sub-skill
# exit 3 ASK    -> ask the one printed forcing question, then re-route
# exit 4 REFUSE -> goal too vague; get one sentence, then re-route
```

| Lane (phase) | Sub-skill | Loop/workflow |
|---|---|---|
| interview | `interview` | single-pass workflow |
| stage-launch | `stage-launch` | single-pass workflow |
| grade-iterate | `grade-iterate` | **bounded grade→iterate loop** |
| run-without-you | `run-without-you` | **recurring cron deployment loop** |
| wrap-up | `wrap-up` | — |

## Compile the loop

```bash
python3 scripts/loop_compiler.py \
  --out-dir ./my-agent --max-iterations 5 --cron "0 9 * * *" --timezone Europe/Berlin --nest-outcome
```

`loop_compiler.py` emits `plan.v1`: `single-pass`, `grade-iterate` (always with a
`max_iterations` cap 1..20), or `cron-loop` (optionally nesting a self-grading
outcome per firing). See [`../../references/loops-and-workflows.md`](../../references/loops-and-workflows.md).

## Pre-flight gates (hard refusals)

1. **No goal set.** If `goal.json` is missing, run
   `goal_state.py init --goal "..."` first. The orchestrator does not guess a goal.
2. **Goal too vague.** Router exit 4 — get one sentence naming the one job before
   routing. Never route on under-3-word goals.
3. **Never make API calls.** Emit BYOK curl; the user runs it with their own
   `$ANTHROPIC_API_KEY`. No script in this plugin touches the network.
4. **Never print the key.** Launch scripts read the key from the environment.

## Hand-off contract

After routing, fork to the sub-skill with: the goal string, `agent_name`,
`out_dir` (`./my-agent`), and the compiled `plan.v1`. When the sub-skill returns,
`goal_state.py advance` moves the phase and the parent gets a ≤100-word digest
(phase done, artifact paths, loop shape, one next step).

## Forcing-question library (walk one at a time; recommend + cite)

1. **"What one job should this agent do end-to-end?"** — *Recommend:* the single
   most repeated task. *Cite:* interview-to-config.md (six intake slots). Refuse to
   route a two-job goal; split into two `./my-agent-*/` folders.
2. **"What kicks it off — you ask it, an event, or a schedule?"** — *Recommend:*
   on-demand for v0, schedule as the Phase-4 upgrade. *Cite:* loops-and-workflows.md.
3. **"How would you grade a good run?"** — *Recommend:* 3–5 rubric lines grounded
   in the output. *Cite:* cma-primitives.md (outcomes; rubric required).
4. **"Is a real integration ready, or do we mock it in v0?"** — *Recommend:* mock
   with a schema-true custom tool; wire the MCP server as v1. *Cite:* interview-to-config.md.
5. **"Should run #10 be smarter than run #1?"** — *Recommend:* attach a memory
   store only if yes; else skip it. *Cite:* cma-primitives.md (memory limits + injection risk).

## Tools

- `scripts/goal_state.py` — own `goal.json` (init/set/status/advance).
- `scripts/goal_router.py` — goal → lane (exit 0 route / 3 ask / 4 refuse).
- `scripts/loop_compiler.py` — goal+phase → `plan.v1` execution shape.

More from alirezarezvani/claude-skills

SkillDescription
a11y-auditAccessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.
ab-test-setupWhen the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.
ad-creativeWhen the user needs to generate, iterate, or scale ad creative for paid advertising. Use when they say 'write ad copy,' 'generate headlines,' 'create ad variations,' 'bulk creative,' 'iterate on ads,' 'ad copy validation,' 'RSA headlines,' 'Meta ad copy,' 'LinkedIn ad,' or 'creative testing.' This is pure creative production — distinct from paid-ads (campaign strategy). Use ad-creative when you need the copy, not the campaign plan.
adversarial-reviewerAdversarial code review that breaks the self-review monoculture. Use when you want a genuinely critical review of recent changes, before merging a PR, or when you suspect Claude is being too agreeable about code quality. Forces perspective shifts through hostile reviewer personas that catch blind spots the author's mental model shares with the reviewer.
aeoAnswer Engine Optimization (AEO) skill — optimize content to be cited by AI language models (ChatGPT, Perplexity, Claude, Gemini, Mistral) as authoritative sources. Distinct from SEO — AEO optimizes for citation in LLM-generated responses, not search rankings. Use when planning content for AI-first search audiences, auditing existing content for E-E-A-T signals, tracking which pages get cited by which LLMs, or building a citation-friendly content strategy. Triggers — 'AEO audit', 'optimize for ChatGPT', 'get cited by Perplexity', 'LLM citation strategy', 'answer engine optimization', 'content for AI search', 'E-E-A-T audit'. Output is a markdown audit report (default) or JSON for pipeline integration. Stdlib-only Python tools.
agent-decision-receiptsMint a tamper-evident, post-quantum-signed receipt for a consequential agent action (deploy, delete, pay, grant-access, model decision) so it can be verified later from the certificate alone. Use when an autonomous agent takes a side-effecting action that may need to be proven later, or when satisfying EU AI Act Article 12 record-keeping. Three decisions: whether an action needs a receipt, minting it, verifying it. Signing is delegated to the open-source OpenAgentOntology package. Not after-the-fact log analysis; not a hosted notary; not a legal opinion.
agent-designerUse when the user asks to design a multi-agent system, pick an orchestration pattern (supervisor/swarm/pipeline), generate tool schemas for agents, or evaluate agent execution logs for cost, latency, and failure bottlenecks. Examples: 'design an agent architecture for research automation', 'generate Anthropic tool schemas from these tool descriptions', 'analyze these agent run logs for bottlenecks'. NOT for Claude Code workflow files (use workflow-builder) or single-agent prompt design (use agent-workflow-designer).
agent-harnessTurn any domain folder of skills into a bounded agentic loop: compile a goal into a verifiable task plan, execute tasks with the domain's own tools, verify every task with machine-run checks, retry with caps, escalate to a human when budgets exhaust, and refuse to close until everything is verified or explicitly waived. Use when you want an agent or subagent to pick up a goal and drive it to a verified close across one of this repo's 18 domains ('run this goal through the engineering harness', 'set up an agentic loop for marketing work', 'make the finance domain self-verifying'). NOT for authoring Claude Code Workflow-tool .js scripts (workflow-builder), N-agent tournaments on one task (agenthub), single-file metric optimization (autoresearch-agent), or discovering published loop recipes (loop-library).
agent-memoryUse when a project's CLAUDE.md has grown past what anyone reads and you want the agent to learn durable facts from its own sessions instead — or when asking why the agent keeps re-learning the same correction, why a remembered rule is wrong, or where a memory line came from. Implements a four-tier store (L0 transcripts / L1 candidates / L2 project context / L3 stable persona) where promotion is earned by recurrence across sessions and days, never by one confident statement, and nothing reaches a committed file without a human adopting it.
agent-protocolInter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, and response formats. Use when C-suite agents need to query each other, coordinate cross-functional analysis, or run board meetings with multiple agent roles.