Claude-code-optimizer optimize-tokens

Use when the user wants to reduce token costs, find savings opportunities, or optimize Claude Code usage.

install
source · Clone the upstream repo
git clone https://github.com/huzaifa525/claude-code-optimizer
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/huzaifa525/claude-code-optimizer "$T" && mkdir -p ~/.claude/skills && cp -r "$T/templates/.claude/skills/optimize-tokens" ~/.claude/skills/huzaifa525-claude-code-optimizer-optimize-tokens && rm -rf "$T"
manifest: templates/.claude/skills/optimize-tokens/SKILL.md
source content

Search for the latest token optimization strategies and analyze this project's setup.

Steps

1. Web Research

Search for the latest tips:

  • "Claude Code token optimization 2026"
  • "Claude Code reduce token usage"
  • "Claude Code cost saving tips"
  • "Claude Code .claudeignore best practices"

Summarize the top 5-10 NEW tips found online.

2. Analyze Current Project

Check CLAUDE.md:

  • Does it exist? How many lines?
  • Is it under 200 lines?
  • Does it have entry points, flow diagrams, decisions?

Check .claudeignore:

  • Does it exist?
  • Does it cover: node_modules, dist, lock files, binary assets?

Check .claude/rules/:

  • Are rules path-scoped?
  • Are there rules loading unnecessarily?

Check .claude/skills/:

  • Are exploration skills using
    context: fork
    ?
  • Are side-effect skills using
    disable-model-invocation: true
    ?

Check MCP servers:

  • How many tool definitions are loaded?
  • Any unused servers?

Check settings:

  • Is MAX_THINKING_TOKENS capped?
  • What model is being used?

3. Output Report

## Token Optimization Report

### Current Setup Score: [X/10]

### What's Good
- [things already optimized]

### Quick Wins (do now)
| Action | Estimated Savings | Effort |
|--------|------------------|--------|
| [action] | [X%] | [Low/Med/High] |

### Latest Tips from Web
- [tip 1 — source]
- [tip 2 — source]
- [tip 3 — source]

### Recommended Changes
1. [specific change with file path]
2. [specific change with file path]
3. [specific change with file path]
<!-- Skill by Huzefa Nalkheda Wala | github.com/huzaifa525 | claude-code-optimizer -->