Skip to content
Agent Orchestration
Skill

/subagent

Delegate work to builtin or custom subagents with single-agent, parallel, forked-context, and intercom-coordinated runs. Use for bounded specialist delegation where a single parent agent stays in control while subagents contribute locate, analyze, pattern-find, research, debug,

BOOST
From plugin
atomic
82521 skills9 agents
Install
$ npx -y skills add bastani-inc/atomic --skill subagent --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/subagent

Context preview

The summary Claude sees to decide when to auto-load this skill.

Delegate work to builtin or custom subagents with single-agent, parallel, forked-context, and intercom-coordinated runs. Use for bounded specialist delegation where a single parent agent stays in control while subagents contribute locate, analyze, pattern-find, research, debug,

SKILL.md

subagent.SKILL.md
name: subagent
description: |
  Delegate work to builtin or custom subagents with single-agent,
  parallel, forked-context, and intercom-coordinated runs.
  Use for bounded specialist delegation where a single parent agent stays in
  control while subagents contribute locate, analyze, pattern-find, research,
  debug, or simplify passes.

Subagent

This skill is for the main parent orchestrator only. Do not inject or follow it inside spawned child subagents. The parent session owns delegation, orchestration, review fanout, and final writer launches; child subagents should receive concrete role-specific tasks and should not run their own subagent workflows.

Use this skill when bounded specialist delegation adds value and the parent should remain in control. Keep interactive, exploratory, conceptual, and conversation-led work inline. Multiple steps, files, tests, validation, or parallelism alone do not require a workflow; use a durable workflow for clearly delegated long-running autonomous jobs that materially need its lifecycle features.

When to Use

  • **Parallel codebase discovery**: combine `codebase-locator`, `codebase-analyzer`, and `codebase-pattern-finder` to map where code lives, how it works, and what existing conventions look like — concurrently, with fresh context per child.
  • **Local research mining**: pair `codebase-research-locator` with `codebase-research-analyzer` to surface prior decisions in `research/` and `specs/` and extract what still applies.
  • **External research**: use `codebase-online-researcher` for authoritative web sources, with persisted findings in `research/web/`.
  • **Debug and fix**: use `debugger` for actual failures that need reproduction, root-cause diagnosis, and a validated patch; conceptual or exploratory debugging can stay inline.
  • **Refinement**: use `code-simplifier` to clean up recently changed code without altering behavior.
  • **Adversarial review**: compose read-only specialists (`codebase-analyzer`, `codebase-pattern-finder`, `debugger` in inspect-only mode, `codebase-online-researcher`) into a parallel review pass — there is no generic `reviewer` agent.
  • **Subagent control**: watch needs-attention signals and kill only when a delegated run is genuinely blocked.
  • **Agent authoring**: create, update, or override agents for a project.

Tool

Use the `subagent(...)` tool for execution, management, status, and control. There is no bundled slash-command launcher.

When the user asks for research, context-build, or cleanup shapes, apply the same pattern directly with `subagent(...)`.

Applying Prompt Techniques

If the user provides a URL, issue, PR, plan, local file, screenshot, or freeform target, treat that target as the primary scope: read or fetch it before launching children, then include it explicitly in every child task. Do not depend on the parent conversation history when the recipe calls for fresh context.

Parallel research technique

Use this when the question needs both external evidence and local implications. Combine `codebase-online-researcher` for official docs, specs, ecosystem behavior, recent changes, benchmarks, and primary sources with `codebase-locator`/`codebase-analyzer` for repository files and current behavior, `codebase-pattern-finder` for analogous conventions, and `codebase-research-locator` + `codebase-research-analyzer` for prior decisions. Give each child a distinct angle: external evidence, local code context, local conventions, prior decisions. Ask for source links or file ranges, confidence level, gaps, and decision implications. Do not ask these children to edit — none of them should write in this pass.

Parallel context-build technique

Use this before planning or implementation when a stronger handoff is needed. Run one top-level parallel call with codebase specialists, giving each task a distinct output path such as `context-build/where-it-lives.md`, `context-build/how-it-works.md`, `context-build/existing-patterns.md`, and `context-build/prior-research.md`. Choose two to four specialists by angle: `codebase-locator` for the file map, `codebase-analyzer` for current behavior, `codebase-pattern-finder` for conventions, and `codebase-research-locator` plus `codebase-research-analyzer` for history. The parent reads the outputs and synthesizes the important context, a recommended next meta-prompt, open questions, assumptions, and artifact paths.

Example shape:

subagent({
  tasks: [
    { agent: "codebase-locator", task: "Map files, tests, fixtures, and configs that touch: ...", output: "context-build/where-it-lives.md" },
    { agent: "codebase-analyzer", task: "Trace how this currently works with file:line refs: ...", output: "context-build/how-it-works.md" },
    { agent: "codebase-pattern-finder", task: "Surface analogous patterns to model after: ...", output: "context-build/existing-patterns.md" }
  ],
  context: "fresh"
})

Parallel cleanup technique

Use this after implementation when the user wants cleanup review or when a final pass would reduce AI-slop. Launch two fresh-context `codebase-analyzer` scouts with `output: false` and `progress: false`: one deslop pass and one verbosity pass. If the `deslop` or `verbosity-cleaner` skills are available, pass the relevant skill to that scout; otherwise inline the criteria. Both scouts are read-only and should flag concrete issues with severity, file/line references, and smallest safe fixes. Phrase the constraint as “Do not modify project/source files; returning findings through the configured output artifact is allowed” when you use `output` or `outputMode: "file-only"`. The parent decides what to apply and asks before making changes unless cleanup was already authorized. When the user opts to autofix, the parent launches one foreground `code-simplifier` writer with the synthesized fixes as its explicit scope.

Builtin Agents

Builtin agents load at the lowest priority. Project agents override user agents

Read more
Ships withatomic

The verifiable coding agent runtime. Define your coding agent's process in natural language with stages, checks, and approval gates instead of hoping it follows your instructions. Primitives for verifiable software factories.

Get the whole plugin

Other skills on atomic.