Agent skill · AI & Agents

token-budget-tracking

Track, optimize, and control token consumption across multi-agent systems. Covers budget allocation, real-time monitoring, cost attribution, per-agent limits, and proactive cost optimization for production LLM deployments.

Cosmic Stack3,294★ · 2 repos on radarProfile →
claude-codeMIT
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill token-budget-tracking --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 16 KB
Bundled scripts: none
Version: 1.0.0
Declared author: cosmicstack-labs
Path: categories/ai-ml/token-budget-tracking/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 364
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Token Budget Tracking & Optimization ## Overview In production multi-agent systems, token costs are the new infrastructure bill — and they can spiral fast. An agent in a loop can burn through hundreds of dollars in minutes. This skill covers how to set budgets, track consumption in real time, attribute costs to specific agents and tasks, and optimize token usage without sacrificing quality. --- ## Core Concepts ### Token Cost Economics | Model | Input ($/1M tokens) | Output ($/1M tokens) | Cost per 100K tasks (4K avg) | |-------|--------------------|---------------------|------------------------------| | GPT-4o | $2.50 | $10.00 | ~$1,250 | | Claude 3.5 Sonnet | $3.00 | $15.00 | ~$1,800 | | GPT-4o-mini | $0.15 | $0.60 | ~$75 | | Claude 3 Haiku | $0.25 | $1.25 | ~$150 | **A single runaway agent** consuming 50K tokens per loop for 100 iterations = **$50-$150** in minutes. ### Budget Dimensions | Dimension | What It Tracks | Why It Matters | |-----------|---------------|----------------| | **Per Agent** | Tokens consumed by each agent | Identify expensive agents | | **Per Task** | Cost per completed task | Measure ROI per task type | | **Per User** | Cost attributed to a user/session

What's inside
Steps it walks through
  1. Overview
  2. Core Concepts
  3. Token Cost Economics
  4. Budget Dimensions
  5. Step-by-Step Implementation
  6. Step 1: Build a Token Counter
  7. Step 2: Implement Budget Enforcements
  8. Step 3: Token Optimization Strategies
  9. Step 4: Real-Time Budget Dashboard
  10. Step 5: Proactive Cost Controls
  11. Step 6: Budget Alerting Rules
  12. Token Budget Planning
  13. Setting Budgets
  14. Optimization Impact
More from mercury-agent-skills
All skills →
About this skill
What does the token-budget-tracking skill do?

Track, optimize, and control token consumption across multi-agent systems. Covers budget allocation, real-time monitoring, cost attribution, per-agent limits, and proactive cost optimization for production LLM deployments.

How do I install it?

Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill token-budget-tracking --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going