dispatching-subagents

dispatching-subagents is a skill for Claude Code, Codex from tienenwu/fables. It costs 82 tokens per session (2,541 once invoked), scanned A, original, MIT.

A set of rules for deciding when to delegate coding work to smaller helper agents and how to brief and check their work.

In plain words
What is it for?
Use it when exploring a repository, researching documentation, planning implementation, reviewing code, or changing many files.
Why use it?
It helps divide large searches, reviews, research tasks, and batch edits while avoiding unnecessary delegation or conflicting changes.

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/tienenwu/fables/dispatching-subagents
Any agent
npx skills add tienenwu/fables --skill dispatching-subagents
Clone the repo
git clone --depth 1 https://github.com/tienenwu/fables

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for dispatching-subagents

README.md
[![agentmods](https://agentmods.dev/badge/skills/tienenwu/fables/dispatching-subagents.svg)](https://agentmods.dev/skills/tienenwu/fables/dispatching-subagents)
Your own site
<a href="https://agentmods.dev/skills/tienenwu/fables/dispatching-subagents"><img src="https://agentmods.dev/badge/skills/tienenwu/fables/dispatching-subagents.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,541 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.00082 $0.02541
Opus 5 $0.00041 $0.01270
Sonnet 5 $0.00016 $0.00508
Haiku 4.5 $0.00008 $0.00254

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

Security

Grade A, and why

dispatching-subagents 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 4d 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.

dispatching-subagents/SKILL.md · 74 lines

How it starts

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

🌐 English version · 繁體中文(正本 / canonical)

模型調度守則(dispatching-subagents)

目標:主對話 context 只裝結論與決策,執行細節外包。派工 prompt 模板見 references/templates.md;判斷測驗見 references/test-scenarios.md

0. 什麼時候「不要」派工(先看這條,避免過度委派)

  • 已知確切檔案與位置的單點查證(例:看某設定檔第 N 行的值)→ 自己 Read,比派 agent 便宜。
  • 對話性回覆、解釋概念、改一兩行 → 自己做。
  • 判準:已知確切檔案路徑或唯一關鍵字、且預計讀的內容 < 200 行 → 自己做;需要跨多目錄搜尋或猜命名 → 派工。

1. 指揮官不下場

以下工作一律派 subagent,主對話只收結論:

  • 大量讀檔/掃 repo/「找出所有用到 X 的地方」→ Explore agent(唯讀,最便宜)
  • 查網頁、讀文件、比較方案 → general-purpose agent(可用 WebSearch/WebFetch)
  • 批次改檔(同一模式套用到多處)→ general-purpose agent
  • 設計實作方案 → Plan agent
  • 程式碼審查 → code-reviewer agent(另有 system-architect 做設計層第二輪)

1.5 平行派工(可平行就平行,序列是例外)

  • 預設平行:2 個以上子任務彼此獨立(無共享狀態、無順序依賴),且唯讀或寫入範圍互不相交 → 同一則訊息一次派出,不要一個等一個。典型:多目錄搜尋、多維度審查(正確性/安全各派一個)、研究查證、read-back 驗收。
  • 禁止平行:會寫同一批檔案(衝突),或後者輸入依賴前者結論(平行只是白跑)。寫入類要平行,先切出互斥的檔案範圍;切不開就序列。
  • 規模上限:一批 ≤ 6 個。更大規模 fan-out(幾十個)屬重型多代理編排(Workflow 等,見 §3),維持「使用者明確要求才用」。
  • 失敗隔離:批次中單一 agent 失敗不阻塞其他結果回收;失敗者單獨照 §5 升降級,不整批重派。

2. 派工三件套(每個派工 prompt 必含,模板見 references/templates.md)

  1. 目標與動機:要做什麼、為什麼(讓 agent 遇到岔路能自己判斷)。
  2. 驗收條件:可機械檢查的完成定義(例:「編譯通過並貼出 gradle 輸出最後 5 行」,不是「確保品質」)。
  3. 回報格式:只回結論 + 檔案:行號;長產物寫到指定路徑,回傳路徑。

3. model 與 effort 的實際可用值(2026-07-24 更新)

  • Agent 工具的 model 參數:haiku / sonnet / opus / fable省略 = 繼承主對話模型,這是預設正解
  • 主迴圈預設跑 Opus(日常駕駛);fable(Fable5)是最貴、消耗最快的層級,只保留給下面標「fable」的兩類,其餘一律不點。
  • Agent 工具沒有 effort 參數;effort 由 agent 定義的 frontmatter 或 session 的 effortLevel 決定。
  • Workflow 工具(多代理編排)並非所有 harness 都有;只在使用者明確要求多代理編排、且工具確實存在時使用。
  • 選型基準(由便宜到貴):
    • haiku:機械性批次套用(模式已驗證過)、格式轉換、簡單 grep 彙整。
    • 省略(=主對話同級,預設 Opus):一般搜尋、實作、審查。
    • opus:難 bug 根因、非品味的高難度評審裁判(卡關升級鏈的終點,見 §5)。
    • fable只兩個用途——(1) 品味「判斷題」(UI 美感、文案語感的裁決);(2) 架構取捨/決策的裁決。丟足 context、拿一個裁決回來執行,不要讓它長時間留在迴圈裡動手。
  • 動手打磨型品味(要跨多輪看 render 成品、逐輪迭代 UI)subagent 給不了——這時手動 /model 把主迴圈切成 Fable5,收工切回 Opus。判準:「要 Fable5 看著成品逐輪改」→ 切主迴圈;「只要一個裁決/選一案」→ 派 fable subagent
  • 仍解不了的品味題/模糊題:向另一個模型家族要第二意見(codex:rescue 等)→ 給使用者選項並誠實標明信心低。

Read the full file on GitHub · 74 lines

Files

What ships with it

2 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. 4d ago First seen · 74 lines · 82 tokens per session scan A e8f5eee01a28

Subscribe to this mod's changes

dispatching-subagents is a skill published in the GitHub repository tienenwu/fables (4 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 2,541 once invoked, about $0.0004 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-31.