What this skill teaches your AI coding agent
Subagent-Driven Development solves the problem of context window degradation in large engineering tasks. Instead of running a single agent across dozens of files until prompt bloat causes hallucination, the orchestrating agent decomposes the project into discrete, decoupled tasks. Each task is dispatched to a spawned subagent running in a pristine context session, supplied strictly with relevant file slices and explicit acceptance criteria. The subagent verifies its own work, and the orchestrator inspects the resulting diff before integration.
Subagent-Driven Development is an open-source multi-agent skill licensed under MIT that dispatches isolated tasks to pristine subagent sessions with strict diff verification.
You need strict, reproducible guardrails enforcing software engineering discipline across agent interactions.
You are building quick disposable prototypes where architectural consistency and test verification are unnecessary.
Activation boundaries & prompt triggers
- 💬 "User prompts: "Multi-agent orchestration protocol isolating tasks into sterile subagent co...""
- 💬 "Executing implementation plans containing distinct, parallelizable subtasks."
- 💬 "When autonomous agent needs strict protocol guardrails"
- ⛔ Decompose tasks into isolated subagents with independent context boundaries.
- ⛔ Parent agent must review subagent diffs and verify test runs before committing changes.
- ⛔ Kill unresponsive or diverging subagents immediately to conserve token limits.
Inject into Claude.ai, Claude Code, or Cursor
Choose your agent runtime to install the playbook directly into local configuration.
.cursor/rules/subagent-driven-development.mdc---description: Multi-agent orchestration protocol isolating tasks into sterile subagent contexts with atomic diff inspection and verification gates.globs: *alwaysApply: false---# Subagent Delegation & Orchestration ProtocolWhen managing complex multi-file engineering tasks:1. TASK ISOLATION: - Break the plan into self-contained tasks with no shared in-flight state. - Each task must have: Target Files, Detailed Spec, and Verification Command.2. SUBAGENT DISPATCH: - Spawn subagents with pristine context. Do not dump the entire session history. - Instruct the subagent to run tests, make atomic changes, and verify its own work.3. ORCHESTRATOR REVIEW: - Receive the subagent's diff and test results. - Inspect the diff for side effects, architectural drift, or missed edge cases. - Merge only upon successful independent test execution.Interactive file tree manifest & playbook viewer
Click any file to audit instructions, verification scripts, and architectural references before installation.
SKILL.md---
name: subagent-driven-development
description: "Multi-agent orchestration protocol isolating tasks into sterile subagent contexts with atomic diff inspection and verification gates."
version: 1.0.0
license: MIT
compatibility: [claude-3-5-sonnet, cursor, windsurf, cline]
---
# Subagent-Driven Development
Subagent-Driven Development solves the problem of context window degradation in large engineering tasks. Instead of running a single agent across dozens of files until prompt bloat causes hallucination, the orchestrating agent decomposes the project into discrete, decoupled tasks. Each task is dispatched to a spawned subagent running in a pristine context session, supplied strictly with relevant file slices and explicit acceptance criteria. The subagent verifies its own work, and the orchestrator inspects the resulting diff before integration.
## Core Guardrails
- ⛔ Decompose tasks into isolated subagents with independent context boundaries.
- ⛔ Parent agent must review subagent diffs and verify test runs before committing changes.
- ⛔ Kill unresponsive or diverging subagents immediately to conserve token limits.
## Autonomous Activation Triggers
When user prompts:
- "User prompts: "Multi-agent orchestration protocol isolating tasks into sterile subagent co...""
- "Executing implementation plans containing distinct, parallelizable subtasks."
- "When autonomous agent needs strict protocol guardrails"
Verified behavioral proof of work
Identical prompt executed with and without this skill under autonomous coding loops.
Execute Subagent-Driven Development under autonomous coding loops
2- // Baseline code3+ // Deterministic scoped patch complying with all protocol invariantsExecution safety and file access boundaries
Agent skills with executable scripts can run shell or Python utilities. Always audit scripts before execution.
- Scope: Bound to active workspace branch.
- Network Calls: Zero outbound network calls.
- AST Syntax Gate: Pre-flight verification blocks breaking mutations.
Operational triage & resolution runbook
Skill not triggering during user conversational prompt▼
Agent system prompt does not associate task keywords with the skill's trigger boundary.
Reference the skill name explicitly in your prompt (e.g., "Follow the rules in subagent-driven-development to perform this refactoring").
Conflicting rules with root project instructions▼
Global instructions (.cursorrules or CLAUDE.md) contradict the skill's invariants.
Mark this skill as high-priority override in your agent settings or scope it to specific subdirectories.
Context window saturation warning▼
Multiple skills loaded simultaneously without progressive disclosure.
Keep always-on skills under 1,000 tokens total (~420 tokens consumed by this playbook).
Skill vs. MCP Server vs. Plain System Prompt
| Primitive | Best Used When | Token Cost | Execution Risk |
|---|---|---|---|
| Agent Skill (`SKILL.md`) | Multi-step domain workflows & procedural guardrails | Low (~400 tokens) | Minimal (AST verified) |
| MCP Server | External system integrations (APIs, live databases) | Zero (until called) | Scoped by tool permissions |
| Plain System Prompt | Simple style guidelines & tone preferences | High (Always in context) | High drift risk |
Composable peers & official repository
Combine with Behavior-Preserving Refactoring Discipline for complementary agent steering across testing and refactoring.
Inspect SkillCombine with Adversarial Code Review & Reception for complementary agent steering across testing and refactoring.
Inspect SkillCombine with Systematic Debugging Protocol for complementary agent steering across testing and refactoring.
Inspect Skill