From cli-delegation
Call the Claude Code CLI (`claude`) as a delegated reviewer, second opinion, or edit worker. Use for Claude Code subagent-style delegation with `claude-rc-spawn`, `claude -p`, `--bg`, `--worktree`, `--tmux`, plan/read-only reviewers, acceptEdits/auto edit workers, JSON/stream-json capture, resume flows, and gotchas around permission modes, worktree cleanup, agent personas, and `--dangerously-skip-permissions`. For persistent `claude remote-control` repo servers, use the claude-remote-control-server skill instead.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cli-delegation:delegate-to-claude-codeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run `claude` for a second opinion, review, or a delegated edit worker. Default
Run claude for a second opinion, review, or a delegated edit worker. Default
path: claude-rc-spawn — interactive Claude in detached tmux with Remote
Control, so the user can watch and steer from claude.ai/code. Use plain
claude -p when machine-readable capture matters more than visibility.
Model default: --model opus --effort high (sonnet --effort low for trivia).
Write the brief to .agent-runs/$slug/prompt.md (slug="claude-$(date +%Y%m%d-%H%M%S)"; mkdir -p ".agent-runs/$slug"): context, exact task, constraints, acceptance criteria,
verification commands, output shape. Demand evidence (commands run, exit
status, changed files, risks) and state explicitly: verify synchronously —
never end the turn waiting on a background monitor or watcher. Workers
otherwise park themselves "waiting for the monitor" and yield-loop.
Launch. Reviewer (read-only) via Remote Control tmux:
claude-rc-spawn \
--cwd "$PWD" \
--prompt-file ".agent-runs/$slug/prompt.md" \
--name "$slug-review" --tmux-session "$slug-review" \
--permission-mode plan \
--model opus --effort high
Edit worker: same command, replacing --permission-mode plan with
--permission-mode acceptEdits, renaming --name/--tmux-session to
"$slug-edit", and adding --worktree "$slug" (Claude creates the worktree
and branch).
Noninteractive fallback (JSON capture, no Remote Control):
cat ".agent-runs/$slug/prompt.md" | claude -p \
--model opus --effort high \
--permission-mode plan \
--output-format json \
--name "$slug-review" --add-dir .
For an edit worker replace --permission-mode plan with
--permission-mode acceptEdits, replace --output-format json with
--output-format stream-json --verbose, and add --worktree "$slug" --max-budget-usd 10. For a fire-and-return background worker use
claude --bg --worktree "$slug" --model opus --effort high --permission-mode acceptEdits --name "$slug-edit" "$(cat ".agent-runs/$slug/prompt.md")" and manage it with
claude agents --json.
Harvest. --output-format json: final text in .result, session id in
.session_id; stream-json --verbose for live logs. claude-rc-spawn
saves the prompt and tmux.log under .agent-runs/<tmux-session>/. Watch
with tmux attach -t "$slug-review" or from claude.ai/code by name. Resume
with claude --continue / --resume <session-id>; add --fork-session to
branch. For large work, split maker and checker: run a fresh reviewer over
the diff before accepting.
CLAUDE_CODE_OAUTH_TOKEN,
ANTHROPIC_API_KEY, or a non-default ANTHROPIC_BASE_URL in the
environment can break it before the session starts; claude-rc-spawn strips
them by default. Remote Control dies with the local process — keep the tmux
session alive until the run completes.--worktree starts from origin/HEAD, not your branch. Set
worktree.baseRef to head when the worker must see local in-progress
state. Worktrees land under .claude/worktrees/<name> (gitignore that dir);
-p --worktree runs get no exit prompt, so clean up finished worktrees
yourself.--agent selects a persona only; hard permissions come from
--permission-mode (plan, acceptEdits, auto) — pair them every time.
Use acceptEdits for a bounded unattended edit worker, auto when you want
background safety checks around broader tool calls.--max-budget-usd caps print-mode (claude -p) runs only.--tmux with --worktree when you want Claude Code's built-in tmux
handling instead of claude-rc-spawn.claude -p skips the workspace-trust dialog — run it only in directories you
trust.--add-dir grants file access; it does not make that directory the working
checkout or copy its config.--name) so concurrent agents are distinguishable in
claude agents and claude.ai/code.claude setup-token /
CLAUDE_CODE_OAUTH_TOKEN auth — full claude.ai login only.--bg background agents (--max-budget-usd is print-mode
only).--dangerously-skip-permissions outside a bounded, preferably
network-isolated container/VM — it can write protected config areas; never
the default edit-worker mode.claude remote-control server mode; use the claude-remote-control-server
skill.npx claudepluginhub t0msilver/skillsGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Synthesizes the current conversation into a structured spec (PRD) and publishes it to the project issue tracker with a ready-for-agent label, without interviewing the user.