token-budget-gate

token-budget-gate is a skill for Claude Code from chrono-meta/forge-harness. It costs 74 tokens per session (2,081 once invoked), scanned A, original, MIT.

A planning check that estimates the token cost of a long or multi-step agent task and assigns it a Green, Yellow, Orange, or Red result. Tokens are the text units used to measure an AI model's work.

In plain words
What is it for?
Use it before multi-agent work, full test suites, or tasks covering many files. It helps decide whether to proceed, reduce the scope, or choose a lighter approach.
Why use it?
It warns when a task may consume more of the available budget than expected. Afterward, it can compare the estimate with actual usage when that information is available.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths.

Part of the fh-commons plugin — 6 skills, 1 agent shipped together

Good fit Use it before multi-agent work, full test suites, or tasks covering many files. It helps decide whether to proceed, reduce the scope, or choose a lighter approach.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chrono-meta/forge-harness/token-budget-gate
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 chrono-meta/forge-harness --skill token-budget-gate
Clone the repo
git clone --depth 1 https://github.com/chrono-meta/forge-harness

Made for: Claude Code.

Or install fh-commons, the plugin that ships this one along with the rest of its 6 skills, 1 agent.

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 token-budget-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/chrono-meta/forge-harness/token-budget-gate/github.svg)](https://agentmods.dev/skills/chrono-meta/forge-harness/token-budget-gate)
Your own site
<a href="https://agentmods.dev/skills/chrono-meta/forge-harness/token-budget-gate"><img src="https://agentmods.dev/badge/skills/chrono-meta/forge-harness/token-budget-gate/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 token-budget-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/chrono-meta/forge-harness/token-budget-gate"><img src="https://agentmods.dev/badge/skills/chrono-meta/forge-harness/token-budget-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,081 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 6
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
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.00074 $0.02081
Opus 5 $0.00037 $0.01040
Sonnet 5 $0.00015 $0.00416
Haiku 4.5 $0.00007 $0.00208

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

Security

Grade A, and why

token-budget-gate 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 9d 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/fh-commons/skills/token-budget-gate/SKILL.md · 207 lines

How it starts

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

token-budget-gate — Pre-Task Token Cost Gate

Multi-step and multi-agent tasks can silently consume large token budgets. This skill estimates cost before execution, outputs a gate verdict, and calibrates estimates against actual usage after completion — preventing surprise overruns without blocking legitimate work.

FH context: FH default execution tier is standard (~15K tokens). This skill gates against accidental full (~30K) or max (~60K+) consumption on tasks that could be handled lighter.


Triggers

  • /token-budget-gate
  • "token budget", "token cost", "how expensive", "will this use a lot of tokens"
  • "estimate tokens", "token estimate before we start"
  • Before invoking: agent-composer, sim-conductor, steel-quench (max-tier skills)
  • Automatically proposed when task description contains: multi-agent, parallel dispatch, full suite, all files, entire codebase

Gate Thresholds (defaults — user-configurable)

Signal Verdict Action
Estimated < 10K tokens 🟢 GREEN Proceed without comment
10K–30K tokens 🟡 YELLOW Proceed with notice — suggest lighter approach if one exists
30K–60K tokens 🟠 ORANGE Confirm before proceeding — present scope reduction options
> 60K tokens 🔴 RED Block + require explicit approval — present mandatory reduction

Custom threshold: user can set TOKEN_BUDGET_MAX=N in conversation or .claude/settings.json.


Execution Steps

Step 1. Parse Task Description

Extract task dimensions:

Dimension Low (×1) Medium (×2) High (×4)
File scope 1–3 files 4–10 files 11+ files / whole codebase
Agent count 0 (inline) 1–2 agents 3+ agents / parallel
Step depth 1–3 steps 4–8 steps 9+ steps
Iteration None 1 round 2+ rounds (wave/loop)
Output size Short answer Medium doc Full report / deck

Step 2. Estimate Token Cost

Base estimates per task type:

Read the full file on GitHub · 207 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. 9d ago First seen · 207 lines · 74 tokens per session scan A b2ea38cb7648

Subscribe to this mod's changes

token-budget-gate is a skill published in the GitHub repository chrono-meta/forge-harness (14 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 2,081 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-30.

Related

Other skills, from other repositories

taiyi-requirement

A requirements-analysis process that turns a proposed change into a REQUIREMENT.md document. It records user needs, acceptance checks, terminology, triggers, and dependencies, with different levels of detail for different project sizes.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-change

A TaiyiForge workflow stage for writing a change proposal in CHANGE.md, with checks for scope, risks, success criteria, and related project documents.

Dong90/oh-my-taiyiforge · 25 tokens

taiyi-integration

A project workflow skill for closing a TaiyiForge change and recording it in a CHANGELOG.md file. It checks review results, tests, and the state of the working tree before archiving the change.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-test

A project workflow skill for verifying an implementation and producing a TEST.md record. TDD means writing a failing test, implementing the change, and then making the test pass; this skill checks that process and other regression cases.

Dong90/oh-my-taiyiforge · 24 tokens

taiyi-ui-design

A design-planning guide for describing how an application's user interface should look and behave. It produces a UI-DESIGN.md document covering layouts, components, interactions, accessibility, and error states.

Dong90/oh-my-taiyiforge · 35 tokens

taiyi-compress

A workflow tool for shrinking large coding-agent conversations and work files into shorter context notes. It can also coordinate separate agents for parallel development and create handoff notes for continuing work in a new session.

Dong90/oh-my-taiyiforge · 51 tokens