Token Efficiency Analyzer
AI Skills

Token Efficiency Analyzer

Skip to main content
< All Topics
Print

Token Efficiency Analyzer

Analyze token usage data from Cursor IDE and Claude API sources to identify cost reduction opportunities without sacrificing output quality or accuracy.

Input

You will receive a JSON document containing aggregated token usage data with two top-level sections:

  • cursor_ide: Cursor IDE usage from CSV exports — cost by model, by workstream, by kind, top expensive calls, cache efficiency
  • claude_api: Claude Admin API usage — cost by model, by date, cache efficiency metrics, daily breakdowns

Analysis Methodology

1. Cost Concentration Analysis

Identify the top cost drivers:

  • Which models consume the most tokens and dollars?
  • Which workstreams (task categories) are most expensive?
  • Are there specific dates with cost spikes? What might explain them?
  • What percentage of total spend is attributable vs. unattributed?

2. Inefficiency Pattern Detection

Check for these specific patterns:

High input-to-output ratio: If a workstream has input tokens 50x+ greater than output tokens, the context may be overstuffed. Flag the specific workstreams.

Low cache utilization: If cache_efficiency_pct is below 40%, there are likely missed caching opportunities. Compare cache reads to total input tokens.

Model-task mismatch: Identify cases where expensive models (Opus, Sonnet with extended thinking) are used for tasks that could be handled by cheaper models. Look at the workstream description and token volume to assess complexity.

Large unattributed blocks: If “Unattributed” is a top workstream by cost, this suggests idle sessions or context bleeding between tasks.

Repeated large prompts: If top_calls shows multiple calls with similar high token counts in a short window, this may indicate duplicate work or failed retries.

Disproportionate cost vs. output: Tasks consuming many tokens but producing small visible output (few output tokens relative to input).

3. Recommendations

Generate specific, actionable recommendations ranked by estimated savings:

Model tiering: Name specific workstreams that could use a cheaper model. Only recommend downgrades for tasks that do not require complex reasoning, nuanced judgment, or creative generation.

Prompt caching opportunities: Identify patterns where system prompts or large context blocks are repeated across calls and could benefit from caching.

Context reduction: Point to workstreams with inflated input tokens and suggest strategies to reduce context size (summarization, selective inclusion, chunking).

Task batching: Identify related tasks that ran separately but could share context in a single session.

Session hygiene: Flag sessions that ran unusually long or had gaps suggesting context was held open without productive use.

4. Savings Estimation

For each recommendation, estimate:

  • Percentage reduction in tokens or cost
  • Approximate dollar savings based on the actual data
  • Implementation difficulty (trivial / moderate / significant)

5. Quality Guardrails

For every recommendation, assess the risk to output quality:

  • LOW RISK: No impact on accuracy (e.g., caching, batching)
  • MEDIUM RISK: Minor quality trade-off possible (e.g., context reduction for simple tasks)
  • HIGH RISK: Could reduce accuracy for complex tasks (e.g., model downgrade for reasoning-heavy work)

Flag any recommendation rated HIGH RISK prominently and explain what could go wrong.

Output Format

Structure your response as:

  1. Executive Summary — 2-3 sentence overview of findings and total estimated savings
  2. Cost Concentration — table showing top 5 cost drivers
  3. Inefficiency Patterns Found — bulleted list with evidence from the data
  4. Recommendations — numbered list, each with: description, estimated savings, difficulty, quality risk
  5. Recommendations NOT Made — things you considered but rejected because they would sacrifice quality

Reference

This skill builds on the general guidance in operations/token-efficiency-review.md (ITI-wide token optimization patterns). Recommendations should be consistent with that document’s principles, particularly the emphasis on prompt caching, model tiering, and context window discipline.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents