Cost Lens — Development skill for Claude Code
Claude Code mod: see where tokens and dollars go, catch cold-cache rebuilds, pick cheaper models.
How to install Cost Lens
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open ZachFara/cost-lens and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cost Lens does
Claude Code mod: see where tokens and dollars go, catch cold-cache rebuilds, pick cheaper models.
Alternatives in Development
- Opik Openclaw — 🦞 Official plugin for OpenClaw that exports agent traces to Opik 725 ★
- TokenCode — 为 Token 燃烧而生:token 越来越便宜,质量永远稀缺——与其省 token,不如把它当燃料烧 34 ★
- Ctx Handoff Mod — Claude Code mod: auto handoff to a fresh conversation when context hits a threshold, keeps the prompt cache wa 25 ★
README
cost-lens
A Claude Code mod that shows where your Claude Code tokens and dollars go, warns before a message rebuilds a cold prompt cache, and can recommend the model that fits each prompt.

Install
Requires Claude Code 2.1.319 or later, Node.js 22.18 or later on your `PATH`, and, for the PRs tab, the GitHub CLI (`gh`). Built and tested on macOS.
At the prompt of a Claude Code terminal session:
/plugin install cost-lens --marketplace ZachFara/cost-lens
Answer `y` to add the marketplace, then pick a scope (user scope loads it in every session). From a shell instead:
claude plugin install cost-lens --marketplace ZachFara/cost-lens
In the desktop app, where `/plugin` does not run: click + next to the prompt box, then Plugins, Add marketplace with `ZachFara/cost-lens`, then Add plugin.
Then type `/cost-lens` to open the pane. Click a tab, or give the pane the keyboard with `ctrl+x tab` (twice while the cache line shows above the prompt: the first press goes to that line) and press `1` to `9`. In Claude Code's fullscreen layout (`/tui fullscreen`) it docks beside the chat; otherwise it opens above the prompt.
What it shows
- Model: the model that fits your last prompts (needs LLM features, below), recent recommendations and how prompts are judged.
- Now: your plan's usage limits (as
/usageshows them), this session's model, cost, cost split and context. - Today, 30 days, All time: total cost, cache hit rate, cost by category and by model.
- Projects, Branches, PRs: where the last 30 days went, and what each branch and pull request of the current repository cost.
- Tips: what drives your usage in the last 24 hours, and the cost of expired-cache rebuilds and large context in the last 30 days.
- A line above the prompt with the prompt cache's state, a warnin
Related Skills
Pre Ship
This is the final quality gate before shipping. Nothing goes to production without passing this checklist. Be
Quiet Rebuild
Prove a no-change build does nothing and a one-file edit rebuilds only its dependents: frozen rebuild card, co
Halv
Halv: the desktop app for Claude Code, Codex and other coding agents. Cuts context tokens with a local proxy a
Claude Code Token Usage
Where your Claude Code tokens and dollars go — per project, then inside a single session. Local-only, stdlib P
Bag Of Holding
Claude Code plugins: agent-costs (tokens and dollars per agent), md-tighten
Claude Rewarm Guard
Warns before Claude Code silently rebuilds an expired prompt cache — and reports what idle-resume re-warms hav
Related Agents
Architect Opus Xhigh
Planning and architecture on Opus 5.5 at xhigh effort, read-only. The top rung — use when a wrong pick means r
Cad Resume
Rebuilds the state of interrupted work from GitHub and the local and remote checkouts after a session ended (t
Auth Payments
Use proactively for anything touching login, sign-up, passwords, sessions, tokens, permissions, roles, payment