subagent-implementation

A command that coordinates several fresh-context coding agents through investigation, implementation, review, and follow-up until a task is complete. It works from an approved specification and updates repository documentation afterward.

In plain words
What is it for?
Use it for planned repository changes that need an investigator, builder, reviewer, commits after successful iterations, and documentation updates.
Why use it?
It divides a coding task into focused stages and repeats review after each implementation cycle, reducing the chance that important work or documentation is missed.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/damusix/atomic-claude/subagent-implementation
Clone the repo
git clone --depth 1 https://github.com/damusix/atomic-claude
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.04980
Opus 5 $0.00026 $0.02490
Sonnet 5 $0.00011 $0.00996
Haiku 4.5 $0.00005 $0.00498

Measured 2d ago against content hash 27498e11dbdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

subagent-implementation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

context/commands/subagent-implementation.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the orchestrator. The user has given you a task. You will NOT implement it yourself. You drive a loop of fresh-context subagents until the task is done, then update documentation.

Phase 0 — Understand

  1. Read the user's task. If anything is genuinely ambiguous and would block work, ask consolidated questions. Otherwise proceed.
  2. Dispatch atomic-investigator first to locate the relevant surface area — files, call sites, existing tests, conventions. Haiku-backed and read-only, so it's cheap. Pass a focused brief (e.g. Map src/auth/. Find: token generation, validation, refresh. Report file:line table.). When a code-intel index is warm, tell the investigator to lead with atomic code explore "<surface-area query>" (one shot returns the relevant symbols, files, and relationships) before targeted verbs or sg/grep — it carries the agent-code-intel partial, but the brief should name the area to explore. Use its file:line — what table as your scoping evidence — do NOT duplicate the search yourself in the main context. The investigator's job is to spend Haiku tokens so Sonnet builder/reviewer dispatches start with a precise target.
  3. Read only the files the investigator flagged that you need to make scoping decisions (spec gate, agent choice, iteration breakdown). Do NOT start implementing.

Skip the investigator only when the task names exact files and there's nothing to locate (e.g. "fix the typo in README.md line 42"). When in doubt, dispatch it — its cost is trivial compared to a misaimed builder.

Spec gate

Derive the topic slug from the task: short kebab-case (e.g. oauth-refresh, user-search-perf).

Check for docs/spec/<topic>.md:

  • Spec exists → use it as the canonical brief source. Skip to the Worktree gate.
  • No spec, task is <30 min of obvious work → proceed inline. State the assumption: no spec; proceeding inline because task is small/obvious. Skip to the Worktree gate.
  • No spec, task is non-trivial → refuse. Tell user: Run /atomic-plan first. I need an approved spec at docs/spec/<topic>.md before launching the implementation loop. Stop.

Read the full file on GitHub · 268 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 268 lines · 53 tokens per session scan A 27498e11dbdb

Subscribe to this mod's changes

subagent-implementation is a command published in the GitHub repository damusix/atomic-claude (83 stars, last pushed 8d ago), licensed MIT. It adds 53 tokens to every session and 4,980 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.