$npx -y skills add Svenja-dev/claude-code-skills --skill token-budget-advisorProactive token budget assessment and task chunking strategy. Use this skill when queries involve multiple large file uploads, requests for comprehensive multi-document analysis, complex multi-step workflows with heavy research (10+ tool calls), phrases like "complete analysis",
| 1 | # Token Budget Advisor |
| 2 | |
| 3 | This skill provides early assessment of token-heavy tasks and recommends chunking strategies to ensure successful completion within context window constraints. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Trigger this skill **before beginning work** when you detect: |
| 8 | |
| 9 | - Multiple file uploads (3+ documents) combined with analysis requests |
| 10 | - Requests for "comprehensive", "complete", "thorough", or "full" analysis |
| 11 | - Multi-document comparative analysis |
| 12 | - Complex workflows requiring 10+ tool calls (extensive web research + synthesis) |
| 13 | - Tasks combining heavy research with large artifacts (reports, presentations) |
| 14 | - Queries spanning multiple dimensions (temporal + categorical + quantitative) |
| 15 | - Requests to "analyze everything" or "create a complete report on all aspects" |
| 16 | |
| 17 | ## Core Function |
| 18 | |
| 19 | This skill serves two purposes: |
| 20 | |
| 21 | 1. **Early warning system**: Assess whether a task will likely exceed token limits |
| 22 | 2. **Strategic planning**: Provide specific, actionable chunking recommendations |
| 23 | |
| 24 | ## Token Estimation Framework |
| 25 | |
| 26 | ### Quick Assessment Heuristics |
| 27 | |
| 28 | Estimate token consumption using these rough guidelines: |
| 29 | |
| 30 | **Input costs:** |
| 31 | - Uploaded document: ~1,000-5,000 tokens each (depending on length) |
| 32 | - Web search result: ~500-1,500 tokens |
| 33 | - Web fetch (full article): ~2,000-8,000 tokens |
| 34 | - Google Drive document: ~1,000-10,000 tokens (varies significantly) |
| 35 | |
| 36 | **Output costs:** |
| 37 | - Simple response: 500-2,000 tokens |
| 38 | - Detailed analysis: 2,000-5,000 tokens |
| 39 | - Long-form report: 5,000-15,000 tokens |
| 40 | - Complex artifact (presentation, document): 5,000-20,000 tokens |
| 41 | |
| 42 | **Tool call overhead:** |
| 43 | - Each tool call includes the query, results, and reasoning: ~1,000-3,000 tokens average |
| 44 | |
| 45 | **Warning thresholds:** |
| 46 | |
| 47 | - **Caution zone** (60-80% of budget): Task is achievable but tight; consider efficiency |
| 48 | - **Danger zone** (80-95% of budget): High risk; strongly recommend chunking |
| 49 | - **Exceeds budget** (95%+ of budget): Task requires chunking; cannot complete in one conversation |
| 50 | |
| 51 | ### Task Complexity Multipliers |
| 52 | |
| 53 | Apply these mental adjustments: |
| 54 | |
| 55 | - **Synthesis required**: Add 30-50% to output estimate (comparing, integrating multiple sources) |
| 56 | - **Iterative refinement**: Add 20-30% (when task involves reviewing and improving) |
| 57 | - **Multiple formats**: Add 20% per additional output type (report + presentation + spreadsheet) |
| 58 | |
| 59 | ## Chunking Strategy Framework |
| 60 | |
| 61 | When a task exceeds token budget, recommend specific chunking approaches. Choose strategies based on task structure: |
| 62 | |
| 63 | ### 1. Sequential Processing |
| 64 | |
| 65 | **Best for:** Time-series data, chronological analysis, ordered workflows |
| 66 | |
| 67 | **Pattern:** |
| 68 | ``` |
| 69 | "This analysis of 12 months of data will exceed our token budget. I recommend we split it into quarters: |
| 70 | - Part 1: Q1-Q2 analysis (Jan-Jun) |
| 71 | - Part 2: Q3-Q4 analysis (Jul-Dec) |
| 72 | - Part 3: Synthesis and recommendations |
| 73 | |
| 74 | Should I start with Part 1?" |
| 75 | ``` |
| 76 | |
| 77 | **When to use:** |
| 78 | - Historical data analysis |
| 79 | - Period-over-period comparisons |
| 80 | - Multi-phase projects |
| 81 | |
| 82 | ### 2. Dimensional Breakdown |
| 83 | |
| 84 | **Best for:** Multi-faceted analysis, different aspects of same topic |
| 85 | |
| 86 | **Pattern:** |
| 87 | ``` |
| 88 | "A complete market analysis covering financial, competitive, regulatory, and technological factors will strain our token budget. Let's break it into: |
| 89 | - Session 1: Financial performance and market size |
| 90 | - Session 2: Competitive landscape and positioning |
| 91 | - Session 3: Regulatory environment and compliance |
| 92 | - Session 4: Technology trends and synthesis |
| 93 | |
| 94 | Which dimension should we tackle first?" |
| 95 | ``` |
| 96 | |
| 97 | **When to use:** |
| 98 | - Multi-stakeholder analysis |
| 99 | - Different analytical lenses on same subject |
| 100 | - Complex business cases |
| 101 | |
| 102 | ### 3. Depth Progression |
| 103 | |
| 104 | **Best for:** Tasks requiring outline → draft → refinement |
| 105 | |
| 106 | **Pattern:** |
| 107 | ``` |
| 108 | "Creating a comprehensive 50-slide presentation with detailed research will exceed our budget. I recommend: |
| 109 | - Round 1: Build structure and outline (30 min) |
| 110 | - Round 2: Develop content for slides 1-25 (45 min) |
| 111 | - Round 3: Develop content for slides 26-50 (45 min) |
| 112 | - Round 4: Refinement pass (30 min) |
| 113 | |
| 114 | Let's start with the outline?" |
| 115 | ``` |
| 116 | |
| 117 | **When to use:** |
| 118 | - Large documents or presentations |
| 119 | - When quality refinement is important |
| 120 | - Creative projects benefiting from iteration |
| 121 | |
| 122 | ### 4. Subset Sampling |
| 123 | |
| 124 | **Best for:** Large document sets where representative sampling works |
| 125 | |
| 126 | **Pattern:** |
| 127 | ``` |
| 128 | "Analyzing all 15 contracts will exceed our budget. I suggest: |
| 129 | - Part 1: Analyze 5 representative contracts (different types/dates) |
| 130 | - Part 2: Based on patterns found, confirm with 5 more |
| 131 | - Part |