token-budget
Manages token budget estimation and tracking to prevent context overflow
Skill by Ashish-Dhankecha
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ashish-dhankecha-token-budget
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/token-budget
What's inside
- Skill name
token-budget- Description
- Manages token budget estimation and tracking to prevent context overflow
- License
- AGPL-3.0
- Instructions
- 163 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Token Budget Skill <role> You are a token-efficient agent. Your job is to maximize output quality while minimizing token consumption. **Core principle:** Every token counts. Load only what you need, when you need it. </role> --- ## Token Estimation ### Quick Estimates | Content Type | Tokens/Line | Notes | |--------------|-------------|-------| | Code | ~4-6 | Depends on verbosity | | Markdown | ~3-4 | Less dense than code | | JSON/YAML | ~5-7 | Structured, repetitive | | Comments | ~3-4 | Natural language | **Rule of thumb:** `tokens ≈ lines × 4` ### File Size Categories | Category | Lines | Est. Tokens | Action | |----------|-------|-------------|--------| | Small | <50 | <200 | Load freely | | Medium | 50-200 | 200-800 | Consider outline first | | Large | 200-500 | 800-2000 | Use search + snippets | | Huge | 500+ | 2000+ | Never load fully | --- ## Budget Thresholds Based on PROJECT_RULES.md context quality thresholds: | Usage | Quality | Budget Status | |-------|---------|---------------| | 0-30% | PEAK | ✅ Proceed freely | | 30-50% | GOOD | ⚠️ Be selective | | 50-70% | DEGRADING | 🔶 Compress & summarize | | 70%+ | POOR | 🛑 State dump required | --- ## Budget Tracking Protocol ### Before Each Task 1. **Estimate current usage:** - Count files in context - Estimate tokens per file - Calculate approximate % 2. **Check budget status:** ``` Current: ~X,000 tokens (~Y%) Budget: [PEAK|GOOD|DEGRADING|POOR] ``` 3. **Adjust strategy:** - PEAK: Proceed normally - GOOD: Prefer search-first - DEGRADING: Use outlines only - POOR: Trigger state dump ### During Execution Track cumulative context: ```markdown ## Token Tracker | Phase | Files Loaded | Est. Tokens | Cumulative | |-------|--------------|-------------|------------| | Start | 0 | 0 | 0 | | Task 1 | 2 | ~400 | ~400 | | Task 2 | 3 | ~600 | ~1000 | ``` --- ## Optimization Strategies ### 1. Progressive Loading ``` Level 1: Outline only (function signatures) Level 2: + Key functions (based on task) Level 3: + Related code (if needed) Level 4: Full file (only if essential) ``` ### 2. Just-In-Time Loading - Load file only when task requires it - Unload mentally after task complete - Don't preload "just in case" ### 3. Search Before Load Always use context-fetch skill first: 1. Search for relevant terms 2. Identify candidate files 3. Load only needed sections ### 4. Summarize & Compress After understanding a file: - Document key insights in STATE.md - Reference summary instead of re-reading - Use "I've analyzed X, it does Y" pattern --- ## Budget Alerts
From Ashish-Dhankecha/Leo, AGPL-3.0.
More from Ashish-Dhankecha/Leo
- 0.469score
debugger
Ashish-Dhankecha
Systematic debugging with persistent state and fresh context advantages
SkillCFreshness: CClaude Code +9 - 0.469score
verifier
Ashish-Dhankecha
Validates implemented work against spec requirements with empirical evidence
SkillCFreshness: CClaude Code +9 - 0.469score
codebase-mapper
Ashish-Dhankecha
Analyzes existing codebases to understand structure, patterns, and technical debt
SkillCFreshness: CClaude Code +9 - 0.469score
context-compressor
Ashish-Dhankecha
Strategies for compressing context to maximize token efficiency
SkillCFreshness: CClaude Code +9 - 0.469score
context-fetch
Ashish-Dhankecha
Search-first skill to reduce unnecessary file reads by searching before loading
SkillCFreshness: CClaude Code +9 - 0.469score
context-health-monitor
Ashish-Dhankecha
Monitors context complexity and triggers state dumps before quality degrades
SkillCFreshness: CClaude Code +9 - 0.469score
empirical-validation
Ashish-Dhankecha
Requires proof before marking work complete — no "trust me, it works"
SkillCFreshness: CClaude Code +9 - 0.469score
executor
Ashish-Dhankecha
Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management
SkillCFreshness: CClaude Code +9 - 0.469score
planner
Ashish-Dhankecha
Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification
SkillCFreshness: CClaude Code +9 - 0.466score
plan-checker
Ashish-Dhankecha
Validates plans before execution to catch issues early
SkillCFreshness: CClaude Code +9 - 0.464score
github
Ashish-Dhankecha
GitHub repository search, commit inspection, and PR automation
SkillCFreshness: CClaude Code +9 - 0.461score
linkedin
Ashish-Dhankecha
LinkedIn automation and profile search tool
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 28, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- AGPL-3.0
- Repository
- github.com/Ashish-Dhankecha/Leo
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Ashish-Dhankecha
- 0.469score
debugger
Ashish-Dhankecha
Systematic debugging with persistent state and fresh context advantages
SkillCFreshness: CClaude Code +9 - 0.469score
verifier
Ashish-Dhankecha
Validates implemented work against spec requirements with empirical evidence
SkillCFreshness: CClaude Code +9 - 0.469score
codebase-mapper
Ashish-Dhankecha
Analyzes existing codebases to understand structure, patterns, and technical debt
SkillCFreshness: CClaude Code +9 - 0.469score
context-compressor
Ashish-Dhankecha
Strategies for compressing context to maximize token efficiency
SkillCFreshness: CClaude Code +9 - 0.469score
context-fetch
Ashish-Dhankecha
Search-first skill to reduce unnecessary file reads by searching before loading
SkillCFreshness: CClaude Code +9 - 0.469score
context-health-monitor
Ashish-Dhankecha
Monitors context complexity and triggers state dumps before quality degrades
SkillCFreshness: CClaude Code +9
Cite this page
token-budget skill. Agent Mart. https://agentmart.dev/skills/ashish-dhankecha-token-budget (last updated 2026-10-24)