fan-out-cost-control

fan-out-cost-control is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 67 tokens per session (2,249 once invoked), scanned A, original, MIT.

A set of rules for controlling a fan-out, where several agents work on separate pieces of one larger task. It limits repeated advice requests, preserves work as agents run, and handles interrupted agents.

In plain words
What is it for?
It is for organising parallel agent runs, deciding when to merge results, writing partial output safely, and resuming interrupted work.
Why use it?
It reduces wasted context and model usage and helps avoid losing nearly finished work when a limit stops an agent.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Part of the agent-traffic-control plugin — 105 skills shipped together

Good fit It is for organising parallel agent runs, deciding when to merge results, writing partial output safely, and resuming interrupted work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/fan-out-cost-control
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.

Any agent
npx skills add wan-huiyan/agent-traffic-control --skill fan-out-cost-control
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 105 skills.

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 fan-out-cost-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/fan-out-cost-control/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/fan-out-cost-control)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/fan-out-cost-control"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/fan-out-cost-control/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fan-out-cost-control

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/fan-out-cost-control"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/fan-out-cost-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00067 $0.02249
Opus 5 $0.00034 $0.01125
Sonnet 5 $0.00013 $0.00450
Haiku 4.5 $0.00007 $0.00225

Measured 6d ago against content hash 9fe5af716c1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

fan-out-cost-control 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 6d 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.

plugins/agent-traffic-control/skills/fan-out-cost-control/SKILL.md · 208 lines

How it starts

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

Fan-Out Cost Control

Problem

A fan-out of N agents burns a session's token budget far faster than the work justifies, and the usual explanations — too many agents, too expensive a model — are not where the money went. Three separate mechanisms do the damage, and all three are invisible from an agent count.

Symptoms, in the order they are usually noticed:

  • A large share of a multi-hour budget disappears in minutes, with no single agent looking unusual.
  • Unrelated sessions start reporting "the advisor is rate-limited" although none of them is a heavy user.
  • A usage limit lands mid-run and most shards return nothing at all, having done nearly all their work.

Context / Trigger Conditions

Any of these makes a fan-out vulnerable:

  1. Agents inherit a standing instruction to consult a stronger model (advisor() or equivalent) before substantive work and again when they believe they are done.
  2. Each agent carries a large context — fetched documents, issue bodies, file contents — rather than a small prompt.
  3. Agents are briefed to write one output file at the end of their run.
  4. Agents are resumed after an interruption rather than started fresh.

Solution

1. The consultation multiplies by the fan-out width. Ban it per shard.

advisor() is for the orchestrator, not for each shard. Judgement gets checked once at the merge, over all rows — never N times over one row each.

Each consultation forwards that agent's entire transcript to a stronger model. With N agents each holding a large context, and every one of them hitting the "I think I'm done" trigger within minutes of the others, the result is N large transcripts sent to the most expensive model available, simultaneously. It is a burst, not a ramp, which is why it does not look like a runaway.

Put the exception in the brief explicitly — the agents are not at fault, they are following a sensible standing instruction:

Do NOT call advisor(), and do not seek a second opinion of any kind. Your own judgement IS the deliverable. Where you are unsure, write confidence: low and say why — an honest low is worth more than a checked row, and the merge already treats low as needing another look.

Read the full file on GitHub · 208 lines

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. 6d ago First seen · 208 lines · 67 tokens per session scan A 9fe5af716c1d

Subscribe to this mod's changes

fan-out-cost-control is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 6d ago), licensed MIT. It adds 67 tokens to every session and 2,249 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-05.

Related

Other skills, from other repositories

vertical-onboarding

Onboarding-and-switching playbook for SMB Product-Builder products. Defines the first-run experience that turns a prospect leaving an incumbent (ServiceTitan/Toast/Mindbody/Shopify/QuickBooks) into an activated user — import-first onboarding, the activation milestone, sample-data fallback, and the time-to-first-value…

avelikiy/great_cto · 111 tokens

claude-code-bash-patterns

Claude Code Bash tool patterns with hooks, automation, git workflows. Use for PreToolUse hooks, command chaining, CLI orchestration, custom commands, or encountering bash permissions, command failures, security guards, hook configurations.

secondsky/claude-skills · 52 tokens

sitrep-panel

Keep a live local HTML report updated as you work on a task — a status board, a running "what's happening now" narrative, screenshots, and a newest-first log — served on localhost so the user can watch progress in a browser tab instead of reading the transcript. Use when the user invokes /sitrep-panel, asks for a…

dbl8005/sitrep-panel · 101 tokens

promote

Turn a scratch script into a permanent tool this repo keeps. Use when a check, report, or analysis has proved worth running more than once.

ArcticFox2029/chamnan · 29 tokens

generate-daily-schedule

Use when turning a day's structured inputs — fixed commitments, tasks, and free windows — into a concrete 15-minute schedule. Domain-agnostic; the caller provides all context.

ne11nn/cantos-plugin · 42 tokens

finito

Closes a working session with a coding agent and produces the full closing package: a numbered summary anyone can read, the next steps, what got written down, the real state of the repository including what is left to push, and two blocks the next session resumes from, one to paste after /compact and one to open a…

Mun1to/Finito · 124 tokens