# Managed Agent Launcher

Builds, grades, and schedules Claude Managed Agents in your own account.

- 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 agent-launcher-orchestrator -g -a claude-code -y`
Codex: `npx skills add alirezarezvani/claude-skills --skill agent-launcher-orchestrator -g -a codex -y`
Cursor: `npx skills add alirezarezvani/claude-skills --skill agent-launcher-orchestrator -g -a cursor -y`
Gemini CLI: `npx skills add alirezarezvani/claude-skills --skill agent-launcher-orchestrator -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add alirezarezvani/claude-skills`

## Description

Use when someone wants to build, launch, grade or schedule a Claude Managed Agent in their own Anthropic account ('build me an agent', 'run this nightly'). Reads the session goal, routes with goal_router.py and compiles the loop with loop_compiler.py.

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

# 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)

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