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.
npx agentmods add skills/agentproto/ts/pb-nested-orchestratornpx skills add agentproto/ts --skill pb-nested-orchestratorgit clone --depth 1 https://github.com/agentproto/tsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/agentproto/ts/pb-nested-orchestrator)<a href="https://agentmods.dev/skills/agentproto/ts/pb-nested-orchestrator"><img src="https://agentmods.dev/badge/skills/agentproto/ts/pb-nested-orchestrator.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.01072 |
| Opus 5 | $0.00032 | $0.00536 |
| Sonnet 5 | $0.00013 | $0.00214 |
| Haiku 4.5 | $0.00006 | $0.00107 |
Grade A, and why
pb-nested-orchestrator 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pb-nested-orchestrator — an agent that spawns its own sub-agents
Goal
Build a two-level tree: you spawn ONE parent; the parent spawns and supervises its own children through a scoped orchestration gateway; you inspect the whole tree from the root and tear it all down at the end.
Golden rule
The nesting PARENT must be adapter claude-code or claude-sdk. A hermes
parent ignores the injected orchestration gateway (proven) and simply cannot
spawn. Children can be any adapter.
Prerequisites (reference by name): ap-spawn-agent, ap-wait-fanin,
ap-lifecycle, and the drive-agents group. Single-level supervision is
pb-supervise-parallel-mission.
Steps
1. Spawn the parent as an orchestrator
agent_start({
adapter: 'claude-code',
cwd: '<ABSOLUTE host path>',
label: 'orch-parent',
orchestrator: true,
prompt: '<parent brief - see step 3>'
})
orchestrator: true mounts a scoped sub-gateway in the parent: a curated
tool subset — start/prompt/wait/poll/output + session_tree + subtree kill —
with a per-child scope token that is revoked when the parent exits.
2. Prove the mount
The agent_start response carries an mcpServers entry whose ref ends in
/mcp/orchestrator?scope=.... That entry is the proof the gateway is
mounted. No entry, no nesting: re-spawn with orchestrator: true before
briefing further — a hermes parent fails silently here, not loudly.
3. Brief the parent to use its tools
The parent brief MUST:
- NAME the orchestration tools it should use (its mounted gateway's start/prompt/wait/poll/output plus session_tree and subtree kill).
- FORBID shell poll loops, verbatim: "Never wait with a shell/terminal sleep-poll loop. Use session_monitor. A killed poll loop corrupts the session permanently."
- Give children authentic, bounded tasks (see gotchas) with disjoint
ownership and absolute
cwds — the same brief discipline aspb-supervise-parallel-mission, one level down.
4. Watch the tree grow from the root
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.
- today First seen · 109 lines · 64 tokens per session scan A 3c54833dc951
pb-nested-orchestrator is a skill published in the GitHub repository agentproto/ts (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 64 tokens to every session and 1,072 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-09-04.
Other skills, from other repositories
github-triage
Triage GitHub issues through a label-based state machine with interactive grilling sessions. Use when user wants to triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.
backlog
Capture single backlog items, or list and triage an existing project backlog. Use this skill whenever the user wants to file a bug, feature request, or backlog item without writing a full PRD, including casual requests mid-conversation like "create an issue for that", "add this to the backlog", or "file a quick bug…
reframe-voice
Write, rewrite, or review content in the evidence-led reframe voice style. Use when the user explicitly asks to write in "reframe voice" or "reframe style". Do NOT use for general writing tasks.
to-tickets
Break a plan, spec, or the current conversation into independently-grabbable tickets on the project issue tracker using tracer-bullet vertical slices, each declaring the tickets that block it. Use when user wants to convert a plan or spec into tickets, create implementation tickets, or break down work into issues.
to-spec
Turn the current conversation context into a spec and submit it as a GitHub issue. Use when user wants to create a spec or PRD from the current context.
goal-flight
Portable Goal Flight workflow for long-running repo work: planning, dispatch, review, recovery, file-backed resume.