Cc Token Optimizer — AI skill for Claude Code
Cut your Claude Code token bill: tool-output trimming, read dedup, model-tier discipline, and live cost + cache-hit stats.
How to install Cc Token Optimizer
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Zoria-Lind/cc-token-optimizer and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cc Token Optimizer does
Cut your Claude Code token bill: tool-output trimming, read dedup, model-tier discipline, and live cost + cache-hit stats.
Alternatives in AI
- Squeez — Hook-based token compressor for 5 AI CLI hosts (Claude Code, Copilot CLI, OpenCode, Gemini CLI, Codex CLI) 188 ★
- GPT 6 Astra Skill — Astra Skill Optimizer for GPT-6/Astra project Skill and workflow adaptation 117 ★
- Coding Agent Account Manager — Sub-100ms auth switching for AI coding CLIs (Claude Code, Codex, Gemini): swap subscription accounts instantly 111 ★
README
cc-token-optimizer
**English** · [中文](README.zh-CN.md)
[](https://www.claudepluginhub.com/plugins/zoria-lind-cc-token-optimizer-plugin)
A Claude Code plugin that cuts what a session actually burns — read de-duplication, output trimming, cache-stall nudges, and a live **token** / cache-hit bar above the prompt. It reports **tokens only**: no cost estimate, deliberately (see *What the numbers mean*).
/plugin install cc-token-optimizer --marketplace Zoria-Lind/cc-token-optimizer
One command to install: no `settings.json` edits, no Node. Claude Code 2.1.275+ (developed and tested against **2.1.296**).
Install
It asks whether to add the marketplace (`y`), then for a scope — `user` applies it to every session. Nothing else to set up:
- The eight hook registrations live in the plugin itself (
plugin/hooks/tokenGuard.ts; the status bar and/token-statusare registered inplugin/hooks/register.tsx), and load with it. - There are two stores, with different lifetimes:
- The hook layer's
guard-state(read records, trim counters, tier facts) lives in the host's plugin KV —/plugins/store/cc-token-optimizer*.json— so it survives across sessions and hot reloads. It is not$.state(v0.2.0 shipped that mistake; fixed in 0.2.1). - The token ledger behind the status bar and
/token-status(rounds, tokens, the last turn's growth) lives in$.state, which is session-scoped by design: it survives a hot reload, but a new session or/clearstarts from zero. Its figures mean this session, not a lifetime total.
- The hook layer's
- Config is read from the plugin's own
config.json; a missing or corrupt file falls back to built-in defaults instead of erroring.
Update:
/plugin marketplace update zoria-plugins
/plugin update cc-token-optimizer@zoria-plugins
Turning it off — the `/plugin` manager (disable or uninstall), or from a shel
Related Skills
OmniGlyph
Cut your Claude bill 59–70% by rendering bulky LLM context as dense PNG pages — 100% read accuracy, exact per-
Token Autopsy
Token autopsy for agent fleets: ingest Claude Code / Codex / Cursor transcripts, emit per-behavior cost report
Claude Code Jev Smart Router
HTTP proxy for Claude Code that selects the Claude model per request to cut cost and latency. Routes on task p
Vibe Gauge
🧠 Native macOS menu-bar dashboard for AI coding: Claude / Codex / Gemini / Grok quotas with sleep-aware usage
VibeGauge
🧠 Native macOS menu-bar dashboard for AI coding: Claude / Codex / Gemini / Grok quotas with sleep-aware usage
AI Fun
Small, free tools for Claude Code users: an API cost card (api-bill) and a 3D map of your whole setup (setup-m
Related Agents
Stats Analyzer
Analyzes ~/.claude/stats-cache.json and history.jsonl to produce a concise usage report with model token break
Usage Reporter
Reads real Claude Code usage from ~/.claude/stats-cache.json. Reports daily/weekly token usage by model, cache
Context Auditor
Use proactively when the user wants to cut Claude Code token cost or asks "why is this session so expensive /