Skip to main content
skill CX Codex

token-optimizer · alexgreensh — Claude Code skill: what it does, how to install

Audits Claude Code and Codex setups for context waste, applies approved fixes, and calculates reclaimed tokens.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add alexgreensh/token-optimizer --skill token-optimizer -a claude-code
Open on GitHub

What token-optimizer does

The skill inspects where your coding setup spends its context window. It reviews CLAUDE.md, MEMORY.md, registered MCP tools, skills, and caching parameters to find dead weight. Every change requires explicit approval, and files are backed up before anything is modified.

Under the hood, six agents gather context metrics concurrently, while a synthesis agent compiles the final optimization plan. The workflow relies on Python 3 running measure.py for runtime checks and metric dashboards. Without Python 3 installed, the pre-check fails immediately and halts the audit.

What it helps with

  • audit instructions in CLAUDE.md and MEMORY.md for bloat
  • detect inactive MCP servers and redundant skills
  • benchmark context window savings before and after cleanup
  • tune cache lifetime and compaction thresholds

Example prompts for the agent

  • Run token-optimizer to audit my context window usage
  • Check for context waste in CLAUDE.md and MCP settings
  • Measure context savings before and after cleaning skills

How to install token-optimizer

1Skills CLI (Vercel)

npx skills add alexgreensh/token-optimizer --skill token-optimizer -a claude-code

2Manually: put the files in place

~/.claude/skills/token-optimizer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/token-optimizer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about token-optimizer

How to install token-optimizer in Claude Code?

Run npx skills add alexgreensh/token-optimizer --skill token-optimizer -a claude-code in your terminal.

What does token-optimizer do?

It analyzes configuration files, prompts, and MCP servers, proposes ways to trim context waste, and calculates before-and-after token savings.

What are the requirements for token-optimizer?

Your system must have Python 3 available, as runtime detection and report dashboards execute measure.py.

Similar skills

All skills for Agent setup: memory, context, orchestration →

token-optimizer by other authors comes first.

From the same set3

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor