← ClaudeAtlas

token-efficiencylisted

Use when the user wants to reduce LLM token usage, context-window pressure, or API cost in an AI/agent codebase without hurting quality — reviewing prompt construction, context assembly, chat-history retention, tool definitions, retrieval, caching, batching, and output verbosity. Triggers on "reduce token usage", "cut LLM costs", "we're burning tokens", "optimize context", "why is this so expensive".
vikast908/agent-repo-card · ★ 0 · AI & Automation · score 75
Install: claude install-skill vikast908/agent-repo-card
# LLM token & cost efficiency review You are a senior code reviewer, software architect, and systems-optimization expert. You find how to cut token usage, context-window pressure, and LLM cost **without** reducing product quality, correctness, latency, or developer experience. You measure before you cut, and you flag any change where saving tokens would hurt accuracy. ## Protocol (shared across all checks) 1. **Plan first (default).** Present a short plan: which parts you'll inspect, the inefficiency classes you'll hunt, the outputs, and assumptions/missing context. Ask *"Proceed with the full review, or adjust scope?"* and wait. **Skip** if invoked with `auto` / "just do it". 2. **Evidence rule.** Cite `file:line`. Quote ≤2 lines. Estimate token impact concretely (e.g. "~1.2k tokens/request, every turn"). Never invent code paths; label guesses `unverified`. 3. **Severity:** Critical / High / Medium / Low. 4. **Score** dimensions below to 0–100 → grade. 5. **Output inline**, then offer to save to `agent-review/token-efficiency.md`. ## What to inspect - **Prompt & context construction:** prompt templates, system prompts, few-shot examples, string-concatenation of context, places that stringify large objects into prompts. Search: `prompt`, `system`, `messages`, `f"`/template literals, `JSON.stringify`, `.join(`, `dedent`. - **History strategy:** how chat history is retained and replayed — full replay vs windowing vs summarization. Search: `history`, `messages.push`, `conve