Claude Code usage
Claude Code Usage Analysis
Empirical analysis of Claude Code token usage: auto-compaction sweet spots across 8 developer workflows and Claude Desktop vs. CLI overhead
Install
git clone https://github.com/inevolin/claude-code-usage-analysis.gitFrom the README
Claude Code usage anti-patterns and best-practices As engineers and builders we are using LLMs for almost all of our work, and the more we use them the more important it becomes to understand how to optimize the performance, reliability and cost of AI tools. I started this research to better understand and improve my own setup and greatly reduce my token usage and costs. Claude Code usage is driven by cache misses, not by how much you type. The expensive habits are ways of throwing that cache away. How long is your cache? 5 minutes on an API key (also Bedrock, Vertex and Foundry). 1 hour on a Pro, Max or Ultra subscription within its usage limits. The Claude CLI and the app behave the same. /usage shows it on its Prompt cache (main) line. (does this apply to you?) Best practices Check your own habits: paste this into Claude Code Everyone uses Claude Code differently. The best settings for you depend on your own logs. Paste the text below into Claude Code to check your habits once: This runs on your computer, on the files in ~/.claude/projects. The prompt tells Claude to use summary numbers and timestamps, not the raw text of your chats. The only thing that leaves your machine is the normal Claude Code conversation. That conversation will include those summary numbers. Or install the skill, then type /claude-code-usage-check in a new session: To run only the analyzer yourself: python3 -m cc_usage_study.analyze ~/.claude/projects --summary --sessions --calls -o ./local-out/report.json. Keep the report file outside git. The tool never copies the text of your prompts. Myths and unknowns - Our calculation says --autocompact 180000 uses about 43% less. In a live test on a 270,000-token session, it only tied the default. We ran that test once, with no long pauses.…
Details
- Repository
- inevolin/claude-code-usage-analysis
- Website
- nevolin.be
- Language
- Python
- License
- MIT
- Last updated
- 17 November 2026
- Topics
- benchmarkclaude-codecontext-windowllmprompt-cachingtoken-usage
FAQ
What is Claude Code Usage Analysis?
Empirical analysis of Claude Code token usage: auto-compaction sweet spots across 8 developer workflows and Claude Desktop vs. CLI overhead It is a usage for Claude Code, from inevolin/claude-code-usage-analysis on GitHub.
How do I install Claude Code Usage Analysis?
Clone inevolin/claude-code-usage-analysis from GitHub and follow the setup steps in its README.
Is Claude Code Usage Analysis popular?
inevolin/claude-code-usage-analysis has 56 GitHub stars and 3 forks. It was last updated on 17 November 2026.
More usage & cost trackers
Axon
49danieltamas/axon
Axon reads the logs your AI coding-agent harnesses already write — Claude Code, Codex, OpenCode — and shows which harness, project, agent, and model is working, how fast, at what cost, and how much code it's producing.
Agenttop
50vicarious11/agenttop
htop for AI coding agents — monitor token usage, costs, and workflows across Claude Code, Cursor, Kiro, Codex, and Copilot
AccountDeck
49nadim-sheikh/AccountDeck
One menu bar app for all your Claude, Claude Code, Codex and ChatGPT accounts: one-click switching, live usage limits, chats that follow you. macOS + Windows (beta).
Claudemon
56keremerkan/claudemon
Live Claude Code usage in your macOS menu bar — download the signed, notarized DMG from Releases. Requires Claude Code CLI + macOS 14+.
Claude Codex Taskbar
49chiarorosa/claude-codex-taskbar
CCT: switch between your Claude Code accounts and see each account's 5-hour and weekly usage for Claude Code and Codex on the Windows 11/10 taskbar, with account labels, quota alerts and a CPU/RAM/GPU/disk monitor. Tiny native Rust app (<1 MB), free, no telemetry.
Claude Code Stats
43AeternaLabsHQ/claude-code-stats
Track and visualize your Claude Code usage, costs, and session statistics with a local HTML dashboard.
Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.