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.

492 stars 68 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add cosmicstack-labs/mercury-agent-skills --skill token-budget-tracking
Manual install
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/ai-ml/token-budget-tracking ~/.claude/skills/token-budget-tracking

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

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 | Bill-back, abuse detection |
| **Per Model** | Cost by LLM provider/model | Model selection decisions |
| **Daily/Weekly** | Aggregate burn rate | Budget forecasting |
| **Per Step** | Tokens per reasoning step | Detect inefficient reasoning |

---

## Step-by-Step Implementation
Read the full skill on GitHub

Details

Skill name
token-budget-tracking
Path
categories/ai-ml/token-budget-tracking/SKILL.md
License
MIT
Repo updated
25 August 2026

FAQ

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 the Token Budget Tracking skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill token-budget-tracking. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Token Budget Tracking popular?

It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.

Related skills

Accessibility

492

cosmicstack-labs/mercury-agent-skills

Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.

Frontend & Design68

Accessibility Testing

492

cosmicstack-labs/mercury-agent-skills

WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation

Testing & QA68

Agent Audit Logging

492

cosmicstack-labs/mercury-agent-skills

Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.

AI, LLMs & Agents68

Agentdescent

220

ThinkFlowLab/agentdescent

Improve a SKILL.md, agent definition, system prompt, small codebase or host plugin by measuring it against examples and evolving it, rather than rewriting it by hand and hoping. Use whenever the user asks to improve, fix, tune, optimise, "train" or get better results out of one of those -- including when they have no test cases yet, because drafting cases for them to check is step one of the procedure, not a prerequisite for it. AgentDescent runs the edits in parallel and keeps only those that raise held-out reward.

AI, LLMs & Agents29

Routerbase Model Gateway

492

cosmicstack-labs/mercury-agent-skills

Configure RouterBase as an OpenAI compatible model gateway for AI apps, with routing, fallback, media generation, and credential handling patterns.

AI, LLMs & Agents68

Cavecrew

155

kubestellar/console

Decision guide for delegating to caveman-style subagents. Tells the main thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder` (1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the work inline or using vanilla `Explore`. Subagent output is caveman-compressed so the tool-result injected back into main context is ~60% smaller — main context lasts longer across long sessions. Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer", "save context", "compressed agent output".

AI, LLMs & AgentsIn 1 list139

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.