check-ai-budget

check-ai-budget is a skill for Claude Code, Codex from getnable/finopsmcp. It costs 53 tokens per session (441 once invoked), scanned A, original, Apache-2.0.

A budget-checking procedure for estimating and checking how many AI tokens a coding task may use. Tokens are the pieces of text that AI systems process and charge for.

In plain words
What is it for?
Use it before expensive tasks, during unusually long work, or when someone asks how much AI budget remains.
Why use it?
It helps avoid starting a large refactor, test run, or agent loop without enough remaining AI budget.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before expensive tasks, during unusually long work, or when someone asks how much AI budget remains.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/getnable/finopsmcp/check-ai-budget
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 getnable/finopsmcp --skill check-ai-budget
Clone the repo
git clone --depth 1 https://github.com/getnable/finopsmcp

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 check-ai-budget

README.md
[![agentmods](https://agentmods.dev/badge/skills/getnable/finopsmcp/check-ai-budget/github.svg)](https://agentmods.dev/skills/getnable/finopsmcp/check-ai-budget)
Your own site
<a href="https://agentmods.dev/skills/getnable/finopsmcp/check-ai-budget"><img src="https://agentmods.dev/badge/skills/getnable/finopsmcp/check-ai-budget/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 check-ai-budget

Your own site · 80×15
<a href="https://agentmods.dev/skills/getnable/finopsmcp/check-ai-budget"><img src="https://agentmods.dev/badge/skills/getnable/finopsmcp/check-ai-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 441 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.00053 $0.00441
Opus 5.5 $0.00021 $0.00176
Sonnet 5.5 $0.00011 $0.00088
Haiku 4.5 $0.00005 $0.00044

Measured today against content hash 1ab1afd8fbb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

check-ai-budget 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.

packs/ai-spend/skills/check-ai-budget/SKILL.md · 38 lines

What it actually says

Check the AI budget before a long task

Your own tokens cost money, and a long task can spend in an hour what a normal day spends. nable tracks this agent's spend against the budget the person set, on this machine.

Before a long task:

  1. Estimate the tokens the task will take. A rough guide: reading a large file is 10 to 50 thousand tokens, a change across 20 files with tests is 500 thousand to 2 million, a long autonomous loop can pass 5 million.
  2. Call the check_ai_budget tool with estimated_next_tokens set to that estimate (or run nable ai-budget --json where there is no MCP server).
  3. Read the verdict and relay it in one sentence, with the headroom it reports:
    • ok: go ahead.
    • warn: tell the person what is left and what the task will likely use, and offer a smaller first step. Continue only if they say so.
    • over: stop before starting and ask. Do not start a reduced version on your own.
  4. Midway through a task that is running long, check again.

Rules:

  • The verdict is advice and the person decides. Never change the budget yourself (set_ai_budget is theirs to call), and never split a task into smaller sessions to stay under a cap.
  • Dollar figures are list-price estimates from token counts, not the bill. Say so if you quote one.
  • When you write code that calls an LLM API, tag each call with feature:<name> and, where there is one, customer:<id> (a LiteLLM request tag or a Langfuse trace tag), so the spend can be attributed.
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. today First seen · 38 lines · 53 tokens per session scan A 1ab1afd8fbb0

Subscribe to this mod's changes

check-ai-budget is a skill published in the GitHub repository getnable/finopsmcp (19 stars, last pushed today), licensed Apache-2.0. It adds 53 tokens to every session and 441 once invoked, about $0.0002 per session on Opus 5.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-10-17.