skills/subspawn/SKILL.md
Bounded subagent delegation and synthesis. Use for explicit subagent, delegation, fan-out, spawn policy, custom agent routing, wait behavior, and evidence-first synthesis.
npx skillsauth add bjornmelin/dev-skills subspawnInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Keep subagents bounded. The main agent owns planning, waits for delegated results, synthesizes evidence, and makes final decisions unless the user says otherwise.
Use this skill when:
Only spawn when the user explicitly asks for subagents or parallel agent work. Do not use this skill to rationalize extra delegation. Keep work local when delegation would add coordination cost without improving quality.
Explicit user instructions override the default delegation heuristics.
If user specifies any below, honor unless unsafe or impossible:
When override differs from default:
Before spawning:
For nontrivial batches, generate a plan before spawning:
python3 skills/subspawn/scripts/subspawn_plan.py plan \
--preset research \
--task "Research current Codex subagent docs" \
--scope "official OpenAI docs and GitHub only"
Use --role for explicit custom role selection, --mode edit only with
disjoint write surfaces, and --json when another tool needs to consume the
plan. Run validate-roles after changing subagent templates.
Packaged standalone subspawn installs include local preset template copies in
templates/agents/; full repo checkouts prefer the sibling deep-researcher and
subagent-creator templates first.
repo_explorer role when installed; keep Codex built-in explorer as a
fallback and avoid custom names that accidentally shadow built-ins.explorer, worker, or default.After spawning a planned batch, immediately wait for every spawned subagent in that batch before doing substantive next work.
While subagents are running, allowed actions are limited to:
wait_agent or equivalent wait/status operationssend_input only to unblock or correct a running subagentresume_agent or close_agent for lifecycle recoveryDo not inspect files, run tests, browse, edit, continue local analysis, start new unrelated tool calls, or produce the final answer until the spawned batch has completed and its results have been synthesized. The only exception is an explicit user instruction to run asynchronous delegation without waiting.
When the runtime exposes explicit close operations, close completed subagent threads after synthesis so long-lived sessions do not accumulate stale agent or MCP resources.
Follow the active Codex tool schema and the custom agent files available in the session.
model and reasoning_effort when inheriting the parent model
or when a custom agent file already pins them.gpt-5.5 for demanding review, debugging, security, planning, and
implementation agents when available.gpt-5.4 when gpt-5.5 is unavailable or the workflow is pinned to it.gpt-5.4-mini for lighter read-heavy scans, docs checks, inventories,
and supporting workers.gpt-5.3-codex-spark only for low-latency, low-token, text-only triage
where depth is not required.Only set model or reasoning_effort directly when the user asks or the
current tool schema supports that override and it is necessary. Include a
one-line reason in the spawn prompt when overriding.
Use medium as the default for most agents.
high when an agent must trace complex logic, check assumptions, handle
edge cases, investigate security-sensitive code, or resolve conflicting
evidence.low only for straightforward lookup, inventory, or deterministic
narrow checks.xhigh rarely, only for unusually hard bounded reasoning where the
selected model supports it.Before increasing effort, tighten:
Use the current spawn_agent schema exactly.
Runtime compatibility matrix:
| Surface | Typical fields | Safe custom-role posture |
| --- | --- | --- |
| legacy tool | agent_type, model, reasoning_effort, fork_context | Keep prompt self-contained. Avoid combining full fork_context with role/model overrides if rejected. |
| multi-agent v2 | agent_type, model, reasoning_effort, task_name, fork_turns | Set stable task_name; use fork_turns: "none" for custom role/model/effort overrides unless inherited history is required. |
| custom agent file | standalone TOML role under ~/.codex/agents or .codex/agents | Prefer omitting per-call model/effort when the role file pins them. |
If the schema exposes fork_turns and task_name:
task_name.agent_type, or direct model/reasoning overrides,
set fork_turns: "none" unless the user explicitly requests inherited
history. Current Codex multi-agent v2 rejects full-history forks with role,
model, or reasoning overrides.fork_turns: "all" only when the child must inherit full parent context
and no role/model/reasoning override is required.If the schema exposes legacy fork_context:
Escalate only specific subagents that underfit.
Escalation order:
Every spawned subagent prompt must explicitly specify:
Spawn prompt shape:
Task: one bounded task or question
Scope: paths, modules, docs, APIs, or explicit ownership
Mode: read-only, or may edit named files only
Wait: parent will wait for all spawned agents before substantive next work
Role: selected custom or built-in agent role
Model: inherited, custom-agent pinned, or explicit override with reason
Reasoning: inherited, custom-agent pinned, or explicit override with reason
Return format:
- Status
- Evidence or role-specific source headings
- Files inspected/changed, queries run, or sources hydrated
- Commands run or provider calls
- Findings or claims with confidence and source IDs
- Risks/blockers
When a custom role template provides a narrower return contract, use the template-specific headings emitted by the planner.
For edit-capable workers, also say:
Require concise, evidence-first output:
No vague summaries without evidence.
Prefer:
For proposed changes, require one of:
Subagent proposes edits without tests: require exact checks to run next.
Use long bounded waits for the full batch rather than short polling loops. If a wait times out:
Do not forget open subagents. Final output must account for every spawned subagent as completed, timed out, closed, or failed.
Before any substantive next work or final answer:
When findings conflict, produce a conflict ledger with:
Validating this skill requires at least one probe forcing real delegation, not only a refusal path.
Good probe:
Planning-only smoke:
python3 skills/subspawn/scripts/subspawn_plan.py validate-roles
python3 skills/subspawn/scripts/subspawn_plan.py plan \
--preset review \
--task "Review this PR for correctness and test gaps" \
--scope "current PR diff only"
Common failure modes + fixes:
tools
Explicit-only Kimi Code CLI frontend/UI advisor for UI audits, redesigns, components, screenshots, before/after comparison, layout, styling, accessibility, responsive behavior, and visual polish. Use only when the user explicitly invokes `$kimi-ui-advisor` and wants Codex to ask Kimi for structured UI suggestions, then review, apply, and verify them in the repo.
development
Run a Codex-only structured code review closeout for local, branch, or commit diffs. Use when the user asks for autoreview, Codex review, structured closeout review, final review before commit/ship, or review after non-trivial code edits.
tools
Use this skill for Firecrawl CLI web work: web search, URL scraping, site mapping, crawling, structured extraction, page interaction, monitoring changes, offline site download via x download, and parsing local documents such as PDF, DOCX, XLSX, HTML, DOC, ODT, or RTF. Trigger for requests to search the web, look up current info, fetch/read/scrape a URL, extract website data, crawl docs, click/fill/login/paginate a page, monitor page changes, save a site offline, or parse a document. Do not trigger for generic local file reads/edits, git/deploy/code tasks, or Firecrawl app integration work.
tools
Triage unresolved Sentry issues into ranked groups, GitHub issue plans, branches, subspawn worktree assignments, PRs, and closeout loops using the sentry CLI, GitHub CLI, and local verification. Use when asked to prioritize Sentry backlogs, group production issues, create GitHub issues or PRs from Sentry evidence, or parallelize Sentry fixes.