cost-budget

cost-budget is a skill for Claude Code from ChewbaccaRoars/claude-code-cost-tracker. It costs 45 tokens per session (448 once invoked), scanned A, original, MIT.

A spending-limit assistant that stores daily, weekly, and monthly budgets in a local file, with amounts in US dollars.

In plain words
What is it for?
Use it to set, change, clear, or check daily, weekly, and monthly spending budgets.
Why use it?
It keeps spending limits in one place and lets you compare current spending with those limits.

Skill for Claude Code

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

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cost-tracker plugin — 6 skills, 3 hooks shipped together

Good fit Use it to set, change, clear, or check daily, weekly, and monthly spending budgets.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ChewbaccaRoars/claude-code-cost-tracker
Claude Code
/plugin install cost-tracker

Made for: Claude Code.

Or install cost-tracker, the plugin that ships this one along with the rest of its 6 skills, 3 hooks.

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 cost-budget

README.md
[![agentmods](https://agentmods.dev/badge/skills/chewbaccaroars/claude-code-cost-tracker/cost-budget/github.svg)](https://agentmods.dev/skills/chewbaccaroars/claude-code-cost-tracker/cost-budget)
Your own site
<a href="https://agentmods.dev/skills/chewbaccaroars/claude-code-cost-tracker/cost-budget"><img src="https://agentmods.dev/badge/skills/chewbaccaroars/claude-code-cost-tracker/cost-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 cost-budget

Your own site · 80×15
<a href="https://agentmods.dev/skills/chewbaccaroars/claude-code-cost-tracker/cost-budget"><img src="https://agentmods.dev/badge/skills/chewbaccaroars/claude-code-cost-tracker/cost-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 448 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.00045 $0.00448
Opus 5 $0.00023 $0.00224
Sonnet 5 $0.00009 $0.00090
Haiku 4.5 $0.00005 $0.00045

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

Security

Grade A, and why

cost-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 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/cost-tracker/skills/cost-budget/SKILL.md · 56 lines

What it actually says

Cost Budget - Spending Limits & Alerts

You are a budget management assistant. Help users set and track spending limits.

Budget File

Budgets are stored at ~/.claude/cost-tracker/budget.json:

{
  "daily": 100,
  "weekly": 500,
  "monthly": 2000
}

All values are in USD. Omit a period to disable that limit.

Commands

Set a budget: The user says something like "set weekly budget to $500" or "limit daily to $100". Write the budget.json file accordingly. Merge with existing values — don't overwrite other periods.

Check status: Run the report script to show current spend vs budget:

node "${CLAUDE_PLUGIN_ROOT}/skills/cost-tracker/scripts/report.js" week

Then read budget.json and compare.

Clear budget: Delete or empty the budget.json file.

Instructions

  1. When the user wants to set a budget, read the existing budget.json (if any), merge the new value, and write it back
  2. When the user wants status, read budget.json and the cost log, calculate spend for each period, show a table comparing spend vs limit with percentage
  3. Budget alerts appear automatically via the Stop hook — no action needed from the skill
  4. Always confirm what was set: "Set weekly budget to $500. You'll see alerts at 80% ($400) and 100% ($500)."

Budget Alert Behavior

The cost-monitor Stop hook automatically checks budget.json each turn:

  • 80%: Yellow warning with spend amount and percentage
  • 100%: Red alert suggesting model switch or session wrap-up
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 · 56 lines · 45 tokens per session scan A 88f02ce9d025

Subscribe to this mod's changes

cost-budget is a skill published in the GitHub repository ChewbaccaRoars/claude-code-cost-tracker (6 stars, last pushed 2mo ago), licensed MIT. It adds 45 tokens to every session and 448 once invoked, about $0.0002 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.

Related

Other skills, from other repositories