recursive-subagent

A set of rules for deciding when to delegate work to other agents and how to review their results. It covers roles such as analysis, planning, code review, testing, implementation, and memory checks.

In plain words
What is it for?
Use it to organize bounded sub-agent tasks, route work when configured, verify returned results, and perform a self-review when delegation is unavailable.
Why use it?
Delegated work can be incomplete or lose important context without a clear handoff and audit process. The skill keeps one main agent responsible for coordination and final checks.

Skill for Claude CodeCodex

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 skills/try-works/recursive-mode/recursive-subagent
Any agent
npx skills add try-works/recursive-mode --skill recursive-subagent
Clone the repo
git clone --depth 1 https://github.com/try-works/recursive-mode

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,489 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.00058 $0.02489
Opus 5 $0.00029 $0.01244
Sonnet 5 $0.00012 $0.00498
Haiku 4.5 $0.00006 $0.00249

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

Security

Grade A, and why

recursive-subagent 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.

skills/recursive-subagent/SKILL.md · 243 lines

How it starts

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

recursive-subagent

Use this skill to decide whether subagents help a recursive-mode phase and to enforce the handoff contract when they do.

This skill does not relax the canonical workflow. The main agent remains responsible for:

  • one active recursive phase at a time
  • serving as the single orchestrator the user is currently interacting with
  • full audit rigor before lock
  • rejecting incomplete or context-free subagent output
  • falling back to self-audit when subagents are unavailable

If recursive-router is installed, consult it when the user has explicitly asked to use routing or when an active configured external route exists for the selected delegated role. Because router discovery and configuration may inspect local CLI and provider configuration on the device, ask the user first before new setup or policy changes. Do not ask again merely to honor an already configured external route for a role that must now be dispatched.

Once the user confirms routed setup, explicitly requests routed delegation, or the role has an active configured external route, consult:

  • /.recursive/config/recursive-router.json
  • /.recursive/config/recursive-router-discovered.json
  • ../recursive-router/SKILL.md

before choosing a routed external CLI/model path for a role.

Re-read those files from disk immediately before every routed dispatch. Do not reuse an earlier in-memory resolution if policy, discovery state, or fallback behavior may have changed during the run. If recursive-router-resolve returns external-cli, use recursive-router-invoke for that delegated slot. Local/self-audit execution is only the valid path when the route resolves to fallback-local, local-only, blocked, or ask-user, and the recorded artifact must say so.

Priority Of Use

Use subagents in this order of value:

  1. analyst
  2. planner
  3. code reviewer
  4. memory auditor
  5. tester
  6. implementer for truly disjoint write scopes

Do not treat subagents as required infrastructure. They are optional infrastructure, but delegated audit/review is the preferred default when subagents are available and the context bundle is complete.

Read the full file on GitHub · 243 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 243 lines · 58 tokens per session scan A 81a804532c6f

Subscribe to this mod's changes

recursive-subagent is a skill published in the GitHub repository try-works/recursive-mode (129 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 2,489 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.