Help us improve
Share bugs, ideas, or general feedback.
From agentops
Spawns isolated Claude Code subagents using the Task tool, with configurable roles, tools, memory, and worktree isolation. Provides a SubagentStop gate for coordinating parallel workers.
npx claudepluginhub boshu2/agentops --plugin agentopsHow this skill is triggered — by the user, by Claude, or both
Slash command
/agentops:cc-subagentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Operator-side skill for driving **fungible** Claude Code workers — the Task tool plus reusable `.claude/agents/*.md` definitions — with correct background, isolation, model/tools/memory, and effort scoping, plus a clean SubagentStop gate. This drives the harness; it is never client-facing.
Guides creating, configuring, and orchestrating Claude Code subagents and Task tool. Covers prompts, tools, models, file structures, and multi-agent workflows.
Claude Code subagent lifecycle: creation, configuration, evaluation, and troubleshooting. Invoke whenever task involves any interaction with Claude Code subagents — designing, debugging, iterating, or deciding when to delegate work to isolated agent contexts.
Guides creation of specialized Claude Code subagents in .claude/agents/ using TDD process with tasks like RED test, GREEN agent write, and refactor. Use for 'create agent', 'add reviewer', or isolated tasks.
Share bugs, ideas, or general feedback.
Operator-side skill for driving fungible Claude Code workers — the Task tool plus reusable .claude/agents/*.md definitions — with correct background, isolation, model/tools/memory, and effort scoping, plus a clean SubagentStop gate. This drives the harness; it is never client-facing.
A subagent is a Task-tool worker that runs in its own context window with its own tool set. It returns one final report to the orchestrator; the orchestrator never sees its intermediate transcript. That isolation is the whole value — and the whole hazard.
Two ways to spawn:
subagent_type of general-purpose (or a defined agent) and a self-contained prompt. Fast, no file needed..claude/agents/<role>.md once, then spawn it by name. Reusable, version-controlled, scoped. Confirm it loads with claude agents before a multi-agent run.Use this skill to decide whether to spawn, which role profile to use, and how to gate the return. It composes with ntm (when you outgrow Task and need persistent tmux panes), cc-hooks (for the SubagentStop gate), and agent-fungibility-philosophy (the why: interchangeable workers over bespoke ones).
claude -p / --print to spawn a worker. Why: -p bills the API per token, not the Max subscription — it silently burns money. Use the Task tool (in-session, on the sub) or NTM panes / codex exec for out-of-session workers. (Overnight factory runs have burned API this exact way.)isolation: worktree when overlap is unavoidable.tools: in the agent file; an over-privileged worker is a blast-radius bug.Spawn a subagent only when at least one is true:
Inline it when the task is sequential, small, or tightly coupled to current context — spawning costs a full context load and a round-trip.
Checkpoint: State the parallelism and file-ownership map out loud before spawning. If two workers would touch one file, collapse to one worker.
Map the role to frontmatter (see references/agent-profiles.md for full examples):
| Role | model | tools | effort | background | isolation |
|---|---|---|---|---|---|
| Explorer / research | fast (haiku/sonnet) | Read, Grep, Glob | low | true | none |
| Judge / validator | sonnet | Read, Grep, Bash(test) | low–medium | true | none |
| Implementor | opus/sonnet | Read, Edit, Write, Bash | high | per-task | worktree |
| Long background teammate | sonnet | role-scoped | medium | true | worktree |
effort right-sizes reasoning: low for explorers/judges, high for implementors/hard debugging (set via /effort or the agent profile). Use memory: to scope what durable context the role loads.
Checkpoint: Confirm each parallel worker's tools: is the minimum for its job and write-workers carry isolation: worktree.
.claude/agents/<role>.md exists, run claude agents to confirm it loads, then dispatch by subagent_type.background: true so the orchestrator keeps working while the teammate runs; it re-engages when the worker finishes.isolation: worktree gives the worker its own git worktree (optionally worktree.sparsePaths to limit checkout in a big monorepo). Fall back to manual git worktree only on runtimes without native support.DO NOT use claude -p / --print. (LAW-0 — billing invariant)rch / ssh bushido, never the Mac.Checkpoint: All workers dispatched; orchestrator has the list of expected return artifacts per worker.
cc-hooks) to run on each worker's completion: lint the diff, run the worker's test, or block-and-report if the acceptance check fails. (Related events: TaskCompleted, TeammateIdle for background teammates.)Checkpoint: Every worker's output verified by evidence (test/read), not self-report, before integration.
Every worker's final message to the orchestrator MUST contain raw evidence — not a polished narrative. If a worker omits any of these, the orchestrator MUST treat the report as incomplete and request a re-report or a fresh validator.
FINAL REPORT — <bead-id> — <worker-id>
FILES CHANGED:
- path/to/file:line — one line per change (exact paths, no paraphrase)
COMMIT SHA: <git rev-parse HEAD> # or "no commit" + reason
TEST TAIL (verbatim last 20 lines of test output):
<paste>
CONFLICTS SURFACED:
- <any scope-escape, file conflict, or unresolved item the worker found>
(list "none" explicitly if none — do not omit the section)
The orchestrator uses COMMIT SHA to confirm persistence and TEST TAIL to verify
the test runner actually ran. A report with synthesized summaries instead of verbatim
output is honest-by-exception, not honest-by-default — budget the audit cost later.
Format: markdown (the spawn plan + verdicts) — operator-facing only.
Filename: none required; if persisted, .agents/briefings/cc-subagents-<task>-<date>.md.
Structure:
Never emit client-facing artifacts; this skill drives the harness. Apply jargon-translator if any byproduct could leak to a client.
claude -p / --print.isolation: worktree.tools: is the minimum for its role; explorers/judges are read-only.effort set per role (low for explore/judge, high for implement).background: true; claude agents confirms defined profiles load.Fan-out per-file audit: 6 source files, one read-only explorer per file (model: haiku, tools: Read, Grep, Glob, effort: low, background: true). No isolation (read-only). Collect 6 reports, synthesize.
Inline instead: "fix this one typo in README" — do NOT spawn; edit inline. Spawning would cost a full context load for a one-line change.
| Problem | Cause | Solution |
|---|---|---|
| Workers clobbered each other's edits | Overlapping file ownership, no isolation | Combine into one worker, or add isolation: worktree and merge after |
| Worker "did nothing useful" | Prompt assumed conversation state | Make the prompt self-contained: paths, spec, acceptance check |
| API charges spiked overnight | A worker spawned via claude -p | Banned — use Task / NTM panes / codex exec; add a dcg/guard rule |
| Defined agent not picked up | .claude/agents/<role>.md not loaded | Run claude agents; check name matches subagent_type; verify settings precedence |
| Worker reported done but work is broken | Trusted self-report | Wire SubagentStop to re-run the test / re-read the artifact; verify by evidence |
| Orchestrator blocked while worker runs | Foreground spawn | Set background: true so the orchestrator continues and re-engages on completion |
references/agent-profiles.md — full .claude/agents/*.md frontmatter examples per role.claude-code-latest-features.md (skills/shared/references/) — canonical Task/agent/worktree/hook primitives.ntm skill — when you outgrow Task and need persistent tmux panes (out-of-session workers).cc-hooks skill — authoring the SubagentStop / TaskCompleted gate.agent-fungibility-philosophy skill — why interchangeable workers beat bespoke ones.https://code.claude.com/docs/en/sub-agents, https://code.claude.com/docs/en/hooks, https://code.claude.com/docs/en/cli-reference.