Manage Token Budget

Monitor, cap, and recover from context accumulation in agentic systems. Covers per-cycle cost tracking, context window auditing, budget caps with enforcement policies, emergency pruning when approaching limits, and progressive disclosure integration to minimize token spend on routing. Use when running long-lived agent loops (heartbeats, polling, autonomous workflows), when context windows are growing unpredictably between cycles, when API costs spike beyond expected baselines, when designing new agentic workflows that need cost guardrails from the start, or when post-mortem analysis reveals a

45 stars 4 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add pjt222/agent-almanac --skill manage-token-budget
Manual install
git clone --depth 1 https://github.com/pjt222/agent-almanac.git /tmp/agent-almanac
mkdir -p ~/.claude/skills
cp -r /tmp/agent-almanac/i18n/caveman-lite/skills/manage-token-budget ~/.claude/skills/manage-token-budget

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

From the SKILL.md

# Manage Token Budget

Control the cost and context footprint of agentic systems by tracking token usage per cycle, auditing what consumes context space, enforcing budget caps, pruning low-value context under pressure, and routing through metadata before loading full procedures. Core principle: every token in the context window must earn its place. Tokens that inform decisions stay; tokens that occupy space without influencing output get pruned.

Community evidence: a 37-hour autonomous session cost $13.74 from a 30-minute heartbeat interval combined with verbose system instructions and unchecked context accumulation. The fix was rewriting the heartbeat to 4-hour intervals, switching to notification-only mode, and eliminating feed browsing from the loop. This skill codifies the patterns that prevent such incidents.

## When to Use

- Running long-lived agent loops (heartbeats, polling cycles, autonomous workflows) where costs compound over time
- Context windows are growing unpredictably between execution cycles
- API costs have spiked beyond expected baselines and a post-mortem is needed
- Designing a new agentic workflow with cost guardrails built in from the start
- After a cost incident, to audit what went wrong and prevent recurrence
- When system prompts, memory files, or tool schemas have grown large enough to dominate the context window

## Inputs

- **Required**: The agentic system or workflow to budget (running or planned)
Read the full skill on GitHub

Details

Skill name
manage-token-budget
Path
i18n/caveman-lite/skills/manage-token-budget/SKILL.md
License
MIT
Repo updated
18 November 2026

FAQ

What does the Manage Token Budget skill do?

Monitor, cap, and recover from context accumulation in agentic systems. Covers per-cycle cost tracking, context window auditing, budget caps with enforcement policies, emergency pruning when approaching limits, and progressive disclosure integration to minimize token spend on routing. Use when running long-lived agent loops (heartbeats, polling, autonomous workflows), when context windows are growing unpredictably between cycles, when API costs spike beyond expected baselines, when designing new agentic workflows that need cost guardrails from the start, or when post-mortem analysis reveals a

How do I install the Manage Token Budget skill?

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

Is Manage Token Budget popular?

It lives in pjt222/agent-almanac, which has 45 GitHub stars and 4 forks, and is included in 1 curated skill list.

Related skills

Adapt Architecture

45

pjt222/agent-almanac

Execute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.

Software DevelopmentIn 1 list

Adaptic

45

pjt222/agent-almanac

Master skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.

OtherIn 1 list

Add Puzzle Type

45

pjt222/agent-almanac

Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.

Testing & QAIn 1 list

Meditate Guidance

45

pjt222/agent-almanac

Guide a person through a meditation session from preparation through closing. AI coaches posture selection, breath anchoring, working with distractions, shamatha (calm abiding), vipassana (insight), and session integration. Use when a person wants to begin or deepen a meditation practice, when someone needs to prepare their mind for focused work, when grounding is needed before or after energy healing work, when managing stress or anxiety, or for integration after intense experiences.

AI, LLMs & AgentsIn 1 list

Listen Guidance

45

pjt222/agent-almanac

Guide a person in developing active listening skills. AI coaches receptive mindset preparation, full-presence attending, reflective paraphrasing, clarifying questioning, synthesis of understanding, and integration of insights into communication practice. Use when a person wants to improve communication, when someone keeps misunderstanding others or feels misunderstood, when preparing for a difficult conversation such as a feedback session or conflict resolution, or when a person notices they talk more than they listen.

AI, LLMs & AgentsIn 1 list

Metal

45

pjt222/agent-almanac

Extract the conceptual essence of a repository as skills, agents, and teams — the project's roles, procedures, and coordination patterns expressed as agentskills.io-standard definitions. Reads an arbitrary codebase and produces generalized definitions that capture WHAT the project does and WHO operates it, without replicating HOW it does it. Use when onboarding to a new codebase and wanting to understand its conceptual architecture, when bootstrapping an agentic system from an existing project, when studying a project's organizational DNA for cross-pollination, or when creating a skill/agent/t

AI, LLMs & AgentsIn 1 list

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