amanpal3/skills/gsd-token-budget
Claude Code and agent skill by amanpal3/skills
- community
Checking that the SKILL.md file is still in the repository.
Manages token budget estimation and tracking to prevent context overflow
Install
npx vskill@latest install amanpal3/skills/gsd-token-budgetSKILL.md
The same SKILL.md was published earlier as amanpal3/skills/gsd-token-budget.
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
- Estimate current usage:
- Count files in context
- Estimate tokens per file
- Calculate approximate %
- Check budget status:
`` Current: ~X,000 tokens (~Y%) Budget: [PEAK|GOOD|DEGRADING|POOR] ``
- Adjust strategy:
- PEAK: Proceed normally
- GOOD: Prefer search-first
- DEGRADING: Use outlines only
- POOR: Trigger state dump
During Execution
Track cumulative context:
Optimization Strategies
1. Progressive Loading
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:
- Search for relevant terms
- Identify candidate files
- 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
At 50% Budget
At 70% Budget
Integration
This skill integrates with:
context-fetch— Search before loadingcontext-health-monitor— Quality trackingcontext-compressor— Compression strategies/pauseand/resume— Session handoff
Anti-Patterns
⌠Loading files "for context" — Search first ⌠Re-reading same file — Summarize once ⌠Full file when snippet suffices — Target load ⌠Ignoring budget warnings — Quality will degrade
Part of GSD v1.6 Token Optimization. See PROJECT_RULES.md for efficiency rules.
Security
- Security scanPassed, 98 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.antigravity/skills/gsd-token-budget/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amanpal3/skills/gsd-token-budget)