{"id":"2efb78ea-8306-44df-af34-6b8901e96bb0","shortId":"Td896b","kind":"skill","title":"code-subagents","tagline":"Subagent dispatch patterns for implementation tasks. Use when spec-implement has multiple tasks to execute and subagents are available. Covers parallel dispatch for independent work, the two-stage review cycle (spec compliance then code quality), focused prompt construction, and ","description":"# Spec Subagents\n\nFresh subagent per task. Two-stage review after each. Parallel when independent, sequential\nwhen dependent.\n\n## When to Use Subagents\n\n**Use when:**\n- Executing tasks from plan.json with subagent support available\n- 2+ independent tasks that don't share state or files\n- Each problem can be understood without context from others\n\n**Don't use when:**\n- Tasks are tightly coupled (editing the same files)\n- You need to understand full system state across tasks\n- Failures are related (fixing one might fix others)\n- Exploratory work where the problem isn't well-defined yet\n\n## Dispatch Modes\n\n### Sequential (dependent tasks)\n\nTasks with dependencies execute one at a time. Each gets a fresh subagent — no context\npollution from previous tasks.\n\n```\nTask 1 (Entity) → review → complete\nTask 2 (Repository, depends on T1) → review → complete\nTask 3 (Service, depends on T2) → review → complete\n```\n\n### Parallel (independent tasks)\n\nIndependent tasks dispatch simultaneously. One agent per problem domain.\n\n```\nTask A (auth tests) ──→ review → complete\nTask B (billing tests) ──→ review → complete    ← concurrent\nTask C (notification tests) ──→ review → complete\n```\n\n**Independence check:** Would fixing Task A affect Task B? Would they edit the same files?\nIf no to both, dispatch in parallel.\n\n---\n\n## Prompt Templates\n\nUse these templates when dispatching subagents. Each template is battle-tested — don't\nimprovise, use them as-is and fill in the variables.\n\n- **[references/implementer-prompt.md](references/implementer-prompt.md)** — Dispatch an implementer. Includes self-review checklist.\n- **[references/spec-reviewer-prompt.md](references/spec-reviewer-prompt.md)** — Spec compliance review. \"Do not trust the report.\"\n- **[references/code-quality-reviewer-prompt.md](references/code-quality-reviewer-prompt.md)** — Code quality review. Critical/Important/Minor severity.\n\n### Prompt quality rules\n\n- **Focused** — one task, one problem domain\n- **Self-contained** — all context needed is in the prompt. Don't make the subagent\n  read the plan file; provide the full task text\n- **Specific about files** — exact paths, not \"the relevant files\"\n- **Specific about output** — what should the subagent return?\n- **Constrained** — what should they NOT touch?\n\n### Common mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| \"Fix all the tests\" | \"Fix the 3 failures in user.test.ts\" |\n| No context about codebase | Paste the relevant patterns and conventions |\n| No constraints | \"Do NOT change production code\" or scope to specific files |\n| Vague output expectations | \"Return: root cause, changes made, test results\" |\n\n---\n\n## Two-Stage Review\n\nEvery completed task gets two reviews in order. Do not skip either. Do not reverse the order.\n\n### Stage 1: Spec Compliance\n\nDoes the implementation match what was specified?\n\n```markdown\n## Spec Review\n\nReview the implementation against the task specification:\n\n**Task spec:** [paste task from plan.json]\n\n**Files changed:** [list from subagent output]\n\nCheck:\n1. Are all requirements from the task spec implemented?\n2. Is anything implemented that wasn't specified? (over-building)\n3. Do tests cover the specified acceptance criteria?\n4. Does the implementation match the design in design.md?\n\nReport: List any gaps or extras. Mark ✅ if compliant, ❌ if not.\n```\n\nIf the spec reviewer finds issues → the implementer subagent fixes them → spec reviewer\nreviews again. Repeat until ✅.\n\n### Stage 2: Code Quality\n\nIs the implementation well-built?\n\n```markdown\n## Code Quality Review\n\nReview the implementation for code quality:\n\n**Files changed:** [list]\n\nCheck:\n1. Does the code follow existing patterns and conventions?\n2. Are tests meaningful (not just asserting true)?\n3. Is there unnecessary complexity?\n4. Are edge cases handled?\n5. Is the code clean (no dead code, no unnecessary comments)?\n\nRate issues as Critical (blocks merge), Important (should fix), or Minor (nice to have).\n```\n\nIf the quality reviewer finds Critical or Important issues → implementer fixes → reviewer\nreviews again. Minor issues can be noted and moved past.\n\n### Why this order matters\n\nSpec compliance first because there's no point polishing code that doesn't meet the spec.\nQuality second because compliant code still needs to be well-built.\n\n---\n\n## Handling Subagent Questions\n\nSubagents may ask questions before or during implementation. This is good — it means\nthey're thinking rather than guessing.\n\n- Answer clearly and completely\n- Provide additional context if needed\n- Don't rush them into implementation\n- If the question reveals a gap in the plan, that's valuable — note it\n\n---\n\n## Integrating Results\n\nAfter subagents complete (especially parallel dispatch):\n\n1. **Read each summary** — understand what changed\n2. **Check for conflicts** — did any agents edit the same code?\n3. **Run full test suite** — verify all changes work together\n4. **Update task tracking** — mark tasks complete: beads `bd close <id>`, or harness todo list\n\nIf there are conflicts between parallel results, resolve them manually. Don't dispatch\nanother subagent to merge — that requires too much context.\n\n---\n\n## When Subagents Fail\n\nIf a subagent fails a task:\n\n- **Don't fix it manually** — that pollutes your context\n- **Dispatch a fix subagent** with specific instructions about what went wrong\n- **If it fails twice**, stop and escalate to the human. The plan may need revision.\n\nIf failure reveals a design problem:\n\n> \"This task is failing because [reason]. The design in design.md may need to change.\n> Want me to go back to spec-brainstorm?\"","tags":["code","subagents","atelier","martinffx","agent-skills","agentic-coding","anthropic","claude-code","claude-skills","code-review","codex","codex-skill"],"capabilities":["skill","source-martinffx","skill-code-subagents","topic-agent-skills","topic-agentic-coding","topic-anthropic","topic-claude-code","topic-claude-skills","topic-code-review","topic-codex","topic-codex-skill","topic-opencode","topic-prompt-engineering","topic-sdd","topic-spec-driven-development"],"categories":["atelier"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/martinffx/atelier/code-subagents","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add martinffx/atelier","source_repo":"https://github.com/martinffx/atelier","install_from":"skills.sh"}},"qualityScore":"0.461","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 23 github stars · SKILL.md body (5,592 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:05:22.623Z","embedding":null,"createdAt":"2026-05-10T07:03:11.526Z","updatedAt":"2026-05-18T19:05:22.623Z","lastSeenAt":"2026-05-18T19:05:22.623Z","tsv":"'1':161,412,445,534,699 '2':77,166,454,511,543,706 '3':174,354,465,551,717 '4':473,556,727 '5':561 'accept':471 'across':115 'addit':667 'affect':218 'agent':189,712 'anoth':754 'answer':662 'anyth':456 'as-i':253 'ask':645 'assert':549 'auth':195 'avail':23,76 'b':200,220 'back':831 'battl':246 'battle-test':245 'bd':735 'bead':734 'bill':201 'block':576 'brainstorm':835 'build':464 'built':519,639 'c':207 'case':559 'caus':385 'chang':372,386,439,531,705,724,826 'check':213,444,533,707 'checklist':270 'clean':565 'clear':663 'close':736 'code':2,39,283,374,512,521,528,537,564,568,621,632,716 'code-subag':1 'codebas':361 'comment':571 'common':344 'complet':164,172,180,198,204,211,395,665,695,733 'complex':555 'complianc':37,274,414,613 'compliant':490,631 'concurr':205 'conflict':709,744 'constrain':338 'constraint':369 'construct':43 'contain':299 'context':93,155,301,359,668,762,780 'convent':367,542 'coupl':103 'cover':24,468 'criteria':472 'critic':575,591 'critical/important/minor':286 'cycl':35 'dead':567 'defin':134 'depend':62,139,143,168,176 'design':479,811,820 'design.md':481,822 'dispatch':5,26,136,186,231,240,263,698,753,781 'doesn':623 'domain':192,296 'edg':558 'edit':104,223,713 'either':405 'entiti':162 'escal':798 'especi':696 'everi':394 'exact':324 'execut':19,69,144 'exist':539 'expect':382 'exploratori':125 'extra':487 'fail':765,769,794,816 'failur':117,355,808 'file':86,107,226,315,323,329,379,438,530 'fill':257 'find':497,590 'first':614 'fix':120,123,215,347,348,352,502,580,596,774,783 'focus':41,291 'follow':538 'fresh':47,152 'full':112,318,719 'gap':485,682 'get':150,397 'go':830 'good':653 'guess':661 'handl':560,640 'har':738 'human':801 'implement':8,14,265,417,427,453,457,476,500,516,526,595,650,676 'import':578,593 'improvis':250 'includ':266 'independ':28,59,78,182,184,212 'instruct':787 'integr':691 'isn':130 'issu':498,573,594,601 'list':440,483,532,740 'made':387 'make':309 'manual':750,776 'mark':488,731 'markdown':422,520 'match':418,477 'matter':611 'may':644,804,823 'mean':655 'meaning':546 'meet':625 'merg':577,757 'might':122 'minor':582,600 'mistak':345,346 'mode':137 'move':606 'much':761 'multipl':16 'need':109,302,634,670,805,824 'nice':583 'note':604,689 'notif':208 'one':121,145,188,292,294 'order':401,410,610 'other':95,124 'output':332,381,443 'over-build':462 'parallel':25,57,181,233,697,746 'past':362,434,607 'path':325 'pattern':6,365,540 'per':49,190 'plan':314,685,803 'plan.json':72,437 'point':619 'polish':620 'pollut':156,778 'previous':158 'problem':88,129,191,295,812 'product':373 'prompt':42,234,288,306 'provid':316,666 'qualiti':40,284,289,513,522,529,588,628 'question':642,646,679 'rate':572 'rather':659 're':657 'read':312,700 'reason':818 'references/code-quality-reviewer-prompt.md':281,282 'references/implementer-prompt.md':261,262 'references/spec-reviewer-prompt.md':271,272 'relat':119 'relev':328,364 'repeat':508 'report':280,482 'repositori':167 'requir':448,759 'resolv':748 'result':389,692,747 'return':337,383 'reveal':680,809 'revers':408 'review':34,54,163,171,179,197,203,210,269,275,285,393,399,424,425,496,505,506,523,524,589,597,598 'revis':806 'root':384 'rule':290 'run':718 'rush':673 'scope':376 'second':629 'self':268,298 'self-contain':297 'self-review':267 'sequenti':60,138 'servic':175 'sever':287 'share':83 'simultan':187 'skill' 'skill-code-subagents' 'skip':404 'source-martinffx' 'spec':13,36,45,273,413,423,433,452,495,504,612,627,834 'spec-brainstorm':833 'spec-impl':12 'specif':321,330,378,431,786 'specifi':421,461,470 'stage':33,53,392,411,510 'state':84,114 'still':633 'stop':796 'subag':3,4,21,46,48,66,74,153,241,311,336,442,501,641,643,694,755,764,768,784 'suit':721 'summari':702 'support':75 'system':113 't1':170 't2':178 'task':9,17,50,70,79,100,116,140,141,159,160,165,173,183,185,193,199,206,216,219,293,319,396,430,432,435,451,729,732,771,814 'templat':235,238,243 'test':196,202,209,247,351,388,467,545,720 'text':320 'think':658 'tight':102 'time':148 'todo':739 'togeth':726 'topic-agent-skills' 'topic-agentic-coding' 'topic-anthropic' 'topic-claude-code' 'topic-claude-skills' 'topic-code-review' 'topic-codex' 'topic-codex-skill' 'topic-opencode' 'topic-prompt-engineering' 'topic-sdd' 'topic-spec-driven-development' 'touch':343 'track':730 'true':550 'trust':278 'twice':795 'two':32,52,391,398 'two-stag':31,51,390 'understand':111,703 'understood':91 'unnecessari':554,570 'updat':728 'use':10,65,67,98,236,251 'user.test.ts':357 'vagu':380 'valuabl':688 'variabl':260 'verifi':722 'want':827 'wasn':459 'well':133,518,638 'well-built':517,637 'well-defin':132 'went':790 'without':92 'work':29,126,725 'would':214,221 'wrong':791 'yet':135","prices":[{"id":"2c9e4639-c70e-4123-8666-859656a8837b","listingId":"2efb78ea-8306-44df-af34-6b8901e96bb0","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"martinffx","category":"atelier","install_from":"skills.sh"},"createdAt":"2026-05-10T07:03:11.526Z"}],"sources":[{"listingId":"2efb78ea-8306-44df-af34-6b8901e96bb0","source":"github","sourceId":"martinffx/atelier/code-subagents","sourceUrl":"https://github.com/martinffx/atelier/tree/main/skills/code-subagents","isPrimary":false,"firstSeenAt":"2026-05-10T07:03:11.526Z","lastSeenAt":"2026-05-18T19:05:22.623Z"}],"details":{"listingId":"2efb78ea-8306-44df-af34-6b8901e96bb0","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"martinffx","slug":"code-subagents","github":{"repo":"martinffx/atelier","stars":23,"topics":["agent-skills","agentic-coding","anthropic","claude-code","claude-skills","code-review","codex","codex-skill","opencode","prompt-engineering","sdd","spec-driven-development"],"license":"mit","html_url":"https://github.com/martinffx/atelier","pushed_at":"2026-05-18T06:56:45Z","description":"An atelier for Opencode, Claude Code, and other coding agents: spec-driven workflows, deep thinking, and code quality.","skill_md_sha":"7b474643e56c39bc1375ebdb7725833397e5b379","skill_md_path":"skills/code-subagents/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/martinffx/atelier/tree/main/skills/code-subagents"},"layout":"multi","source":"github","category":"atelier","frontmatter":{"name":"code-subagents","description":"Subagent dispatch patterns for implementation tasks. Use when spec-implement has multiple tasks to execute and subagents are available. Covers parallel dispatch for independent work, the two-stage review cycle (spec compliance then code quality), focused prompt construction, and integration of results. Trigger when executing plan tasks with subagent support, when facing 2+ independent problems, or when the user asks to use subagents for implementation."},"skills_sh_url":"https://skills.sh/martinffx/atelier/code-subagents"},"updatedAt":"2026-05-18T19:05:22.623Z"}}