
capsule-driver
Use to drive a slice's phases to completion through in-session capsule subagents in the MAIN worktree — you are the super-orchestrator seat, spawning capsule-orchestrators that each charter 3 phases and spawn their own planners and workers. No worktrees, no dispatch, no confinement. Use when you want a whole slice implemented under a tight context budget without handing the tree to confined workers. Not for confined or parallel-worktree execution — that is /dispatch.
- Installs
- 54
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/davidlee/doctrine --skill capsule-driver- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads capsule-driver automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Capsule driver (the super-orchestrator seat)
Drive a slice's phases to completion through a tier of subagents in the main worktree. You hold the human's attention; everything below you is disposable context.
Announce at start: "Using the capsule-driver skill to drive SL-NNN through capsule orchestrators."
Why this exists
A slice's implementation costs far more context than one agent should hold. The tiering exists so that no single context exceeds ~250k tokens, where both cost and output quality degrade:
you (interactive, human attached)
└── capsule-orchestrator charters ~3 phases, verifies, commits
├── capsule-phase-planner one phase → runtime sheet
└── capsule-worker one phase → source delta
Your own discipline is to spend as little context as possible. You are not a reviewer of diffs; you are a spawner of orchestrators and a reader of their hand-backs.
Preconditions — check these before spawning anything
-
Session permission posture. Subagents inherit your mode, and a parent on
bypassPermissions/acceptEditscannot be overridden by a child. Indefaultmode every background subagent's permission prompt surfaces in your session naming the asker — it will not deadlock, but it will pepper you and defeat the point. Confirm the operator is running a posture they are happy to have inherited by the whole tree. -
Spawn depth. The tree needs 2 layers below you. The default (3) is enough, so nothing needs setting. Only a value set too low blocks: if
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTHis set below 2, at the limitAgentis silently withheld — an orchestrator that cannot spawn will quietly do the work itself. Check withprintenv CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH; unset or ≥ 2 passes. -
No competing writers. Everything runs in the main worktree with no confinement. Confirm no other agent is active in this tree before you start.
-
The slice is planned. Design locked,
plan.tomlauthored, phases exist. This skill implements a plan; it does not make one. -
Background tasks off. Export
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1into the session env before you start. The whole tree is strictly serial —TaskOutputis withheld from every subagent, so no agent here can even read a running child — and the harness backgrounds by default, so every spawn becomes a completion notification that re-invokes its parent at that parent's full context. Without the switch the tiers below fall back to asking for foreground, which is model-mediated, not guaranteed.Set it out of band — per session, never in
settings.json. It is scoped to this seat's run, not to the repo: it also disablesrun_in_backgroundon Bash, which other work in this tree legitimately uses. Do not make it a project setting to save a step.
The loop
- Charter an orchestrator: a named slice and a contiguous run of phases,
typically 3. Spawn
capsule-orchestratorwith that charter, the slice id, and any standing constraint the human has set. Spawn it unnamed — never passname. A named spawn makes the orchestrator a teammate, and a teammate's children cannot hand back to it: their reports land at your seat ("the agent that spawned you is no longer running") instead. - Read its hand-back. Check the per-worker model choices carry real arguments — "the default" is not one. Check what it adapted in the plan.
- Reap it.
TaskStopthe orchestrator the moment you hold its hand-back. It is discharged; left standing it can be woken by a stray notification and pay a full turn at its accumulated context to report nothing. Confirm it is gone from/tasksbefore you charter the next one. - Charter the next orchestrator for the next run of phases. Always spawn a fresh one rather than resuming a tired one.
- Record friction as it is reported to you (
doctrine observation record). - Halt when phase implementation is complete. Do not begin audit.
What you escalate to the human
Subagents cannot ask — AskUserQuestion is withheld from every subagent, so an
orchestrator's only channel is its return value. You are the entire escalation
path. Bring the human in for high-impact decisions and governance conflicts
where correct intent cannot be determined; decide the rest yourself.
Boundaries
- Not
/dispatch. No worktrees, no forks, no confinement, no import step. Workers edit the real tree and orchestrators commit directly. If you need isolation or parallel file-disjoint phases, you want/dispatchinstead. - Do not implement. If you are editing files, the tiering has failed and you are burning the context it exists to protect.
- Do not audit.
/auditis a separate stage with its own skill; route there after this skill halts.
Related
/plan and /phase-plan produce what this consumes. /audit is what comes
after. /dispatch is the confined-worktree alternative to this skill.
FAQ
What does the capsule-driver skill do?
Use to drive a slice's phases to completion through in-session capsule subagents in the MAIN worktree — you are the super-orchestrator seat, spawning capsule-orchestrators that each charter 3 phases and spawn their own planners and workers. No worktrees, no dispatch, no confinement. Use when you want a whole slice implemented under a tight context budget without handing the tree to confined workers. Not for confined or parallel-worktree execution — that is /dispatch.
How do I install capsule-driver?
Run npx skills add https://github.com/davidlee/doctrine --skill capsule-driver in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/capsule-driver/ (personal) or .claude/skills/capsule-driver/ (project).
Which AI agents can use capsule-driver?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is capsule-driver safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains capsule-driver?
It is published by davidlee in davidlee/doctrine. It has 54 recorded installs.
More from davidlee/doctrine
code-review
davidlee/doctrine
Use whenever reviewing code for quality and correctness — a diff, PR, module, or subsystem — producing verified, severity-ranked findings on the RV ledger. Not for comprehension tours (walkthrough) or doctrine-conformance hunts (inquisition, user-invoked only).
pair
davidlee/doctrine
Agentic pair programming — drive a change together with a human partner in the loop, narrating intent and pausing at decision points. Use when the user wants to work side-by-side rather than hand off a whole task. Calibrated by three dials (role, detail, autonomy) and an always-on challenge mandate.
consult
davidlee/doctrine
Use the moment you hit an unanticipated obstacle, a decision with competing tradeoffs, or emergent complexity mid-task — before adapting planned scope, adding a dependency, taking a shortcut, or making any impactful concession on your own.
handover
davidlee/doctrine
Use when handing work to a fresh context — first bring the durable harvest current, then emit a continuation at one of two weights — a printed continuation prompt (light) or a handover.md context packet (full). Use whenever a fresh agent would more efficiently continue.
canon
davidlee/doctrine
Use before making architectural or workflow choices, when correctness depends on project governance, or when entering an unfamiliar subsystem — to load the project's authoritative rules before you act on assumptions.
retrieve-memory
davidlee/doctrine
Use before making non-trivial assumptions — before touching a subsystem you have not this session, before running or changing a command pipeline, when code and docs conflict, when asked "what is the right way here?", when debugging a recurring failure, or when about to answer with "probably/usually/likely".
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available