From captain-claude
Full pipeline: Claude plans, Claude implements, Claude reviews until satisfied.
How this command is triggered — by the user, by Claude, or both
Slash command
/captain-claude:captain-claude <task description>The summary Claude sees in its command listing — used to decide when to auto-load this command
## ⚠️ MANDATORY TIMEOUT — READ BEFORE ANY BASH CALL ⚠️ **Every single Bash tool call in this entire skill MUST include `timeout: 2700000` (45 minutes).** No exceptions. Not even for `config.sh read`. The default 2-minute timeout will kill long-running commands like `plan.sh` and `claude -p`, destroying the user's work. Copy-paste this into every Bash call: `"timeout": 2700000` # /captain-claude Full pipeline: Claude plans, Claude implements, Claude reviews until satisfied. ## Usage ## Flags - `--skip-plan <path>` — Skip planning, use an existing plan file - `--max-rounds <n>` — Cap ...
Every single Bash tool call in this entire skill MUST include timeout: 2700000 (45 minutes). No exceptions. Not even for config.sh read. The default 2-minute timeout will kill long-running commands like plan.sh and claude -p, destroying the user's work. Copy-paste this into every Bash call: "timeout": 2700000
Full pipeline: Claude plans, Claude implements, Claude reviews until satisfied.
/captain-claude <task description and any ad-hoc instructions>
/captain-claude --skip-plan <path> <task description>
--skip-plan <path> — Skip planning, use an existing plan file--max-rounds <n> — Cap review iterations (default: from config)--supervised — Pause after planning and after each review for human approvalParse flags from the user's input. Everything else is natural language.
The user may include ad-hoc instructions for any phase inline. Look for cues like "for planning...", "when implementing...", "for review...", "the reviewer should...", "the planner should...", "make sure to...", or similar natural language directing a specific phase.
Extract:
Read config using ${CLAUDE_PLUGIN_ROOT}/scripts/config.sh read. For each phase, merge ad-hoc instructions (if any) with the config values by appending the ad-hoc instructions to the config array.
If --skip-plan <path> was provided, verify the plan file exists and skip to Phase 2.
Run ${CLAUDE_PLUGIN_ROOT}/scripts/plan.sh "<task description>". Before calling, write the merged plan instructions into a temporary config override if ad-hoc plan instructions were provided. The script outputs a tab-separated line: <plan_path>\t<session_id>. Parse both values.
Verify the plan file exists. If missing, retry once, then report failure.
If --supervised was specified: present the plan and ask for confirmation before continuing.
Initialize state tracking:
${CLAUDE_PLUGIN_ROOT}/scripts/config.sh init-state "<task description>" "<plan file path>" <max_rounds> "<session_id>" <true|false for --supervised>
Read the plan file and ${CLAUDE_PLUGIN_ROOT}/templates/implement-prompt.md.
Substitute the placeholders in the template:
{{plan_contents}} → contents of the plan file{{implementation_instructions}} → merged config + ad-hoc implementation instructions, joined by newlines{{plan_file}} → path to the plan fileExecute the resulting prompt.
The review gate hook fires automatically when implementation tries to stop. It dispatches a separate Claude session to review, and blocks or allows the stop based on the verdict. The loop continues until the reviewer approves or max rounds (from config) is hit.
Note: ad-hoc review instructions need to be available to the hook. Write them to .captain-claude/state.json under an adhoc_review_instructions key during init-state so the hook can merge them with the config values.
.captain-claude/state.json--skip-plan.npx claudepluginhub jul-sh/claude-plugins --plugin captain-claude