cost-budget

cost-budget is a skill for Claude Code, Codex from JeremyDev87/codingbuddy. It costs 53 tokens per session (2,624 once invoked), scanned A, original, MIT.

A cost-control process for autonomous AI work, such as repeated task loops or several agents working in parallel.

In plain words
What is it for?
It helps declare a spending limit, track usage for sessions and parallel work, warn at thresholds, and pause execution when the budget is exceeded.
Why use it?
Long-running AI workflows can keep using paid model calls and exceed expectations unless spending is measured and capped.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Claude Code.

Good fit It helps declare a spending limit, track usage for sessions and parallel work, warn at thresholds, and pause execution when the budget is exceeded.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeremydev87/codingbuddy/cost-budget/github.svg)](https://agentmods.dev/skills/jeremydev87/codingbuddy/cost-budget)
Your own site
<a href="https://agentmods.dev/skills/jeremydev87/codingbuddy/cost-budget"><img src="https://agentmods.dev/badge/skills/jeremydev87/codingbuddy/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/jeremydev87/codingbuddy/cost-budget"><img src="https://agentmods.dev/badge/skills/jeremydev87/codingbuddy/cost-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 2,624 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.02624
Opus 5.5 $0.00021 $0.01050
Sonnet 5.5 $0.00011 $0.00525
Haiku 4.5 $0.00005 $0.00262

Measured 3mo ago against content hash be5cd8b4b8bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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.

packages/rules/.ai-rules/skills/cost-budget/SKILL.md · 349 lines

How it starts

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

Cost Budget Management

Overview

Autonomous AI workflows can consume unbounded resources without guardrails. A single runaway loop — autopilot, ralph, or a multi-wave taskMaestro session — can burn through API credits before anyone notices.

Core principle: Every autonomous workflow must have a cost ceiling. No budget means unlimited spend.

Iron Law:

NO AUTONOMOUS EXECUTION WITHOUT A DECLARED BUDGET
If no budget is set, warn before starting. If budget is exceeded, pause and require override.

When to Use

  • Starting any autonomous workflow (autopilot, ralph, ultrawork, taskMaestro)
  • Running parallel agents across multiple panes or worktrees
  • Multi-session tasks expected to exceed a few dollars
  • Any workflow where cost visibility matters to the user
  • Setting up per-project or per-team cost guardrails

When NOT to Use

  • Single interactive conversations (cost is negligible)
  • Quick one-off questions or file reads
  • Workflows where the user explicitly opts out of budget tracking

Cost Tracking Protocol

Data Collection Points

Cost data is collected at three levels:

Level Scope Data Source Granularity
Session Single Claude Code session Token usage from API responses Per-request
Wave One taskMaestro wave (N parallel panes) Aggregated session costs per pane Per-wave
Project All sessions in a project directory Cumulative across sessions Running total

Cost Estimation

Cost = (input_tokens × input_price) + (output_tokens × output_price)

Model pricing (per 1M tokens):
  opus:   input=$15.00  output=$75.00
  sonnet: input=$3.00   output=$15.00
  haiku:  input=$0.25   output=$1.25

Note: Prices are approximate and should be updated when model pricing changes. The skill defines the protocol, not hardcoded prices.

Collection Methods

  1. Environment variables (preferred):
    export COST_BUDGET_USD=10.00          # Total budget in USD
    export COST_BUDGET_TOKENS=5000000     # Alternative: token-based budget
    export COST_BUDGET_SCOPE=project      # session | wave | project
    

Read the full file on GitHub · 349 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. 3mo ago First seen · 349 lines · 53 tokens per session scan A be5cd8b4b8bc

Subscribe to this mod's changes

cost-budget is a skill published in the GitHub repository JeremyDev87/codingbuddy (30 stars, last pushed 7mo ago), licensed MIT. It adds 53 tokens to every session and 2,624 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-08-30.

Related

cost-budget compared with skills from other repositories

cost-budget next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cost-budgetJeremyDev87/codingbuddySkill307mo agoMITA53Claude Code, Codex
energy-procurementhashgraph-online/awesome-codex-pluginsSkill1.6k2d agoApache-2.0A93Claude Code, Codex
cost-trackingericrisco/rsc-harnessSkill6825d agoMITA91Claude Code, Codex
swapper-depositswapperfinance/swapper-toolkitSkill85014d agoMITA158Claude Code
financetravisjneuman/.claudeSkill115yesterdayMITA48Claude Code
investment-memo-generatortravisjneuman/.claudeSkill115yesterdayMITA37Claude Code
ascend-webhookshookdeck/webhook-skillsSkill1043d agoMITA61Claude Code, Codex