cc-ratio
v1.0.0
Published
Analyze tool usage ratios in Claude Code sessions — Read:Edit, Write:Edit, Bash:Grep and more
Maintainers
Readme
cc-ratio
Analyze tool usage ratios in Claude Code sessions — what's your Read:Edit ratio?
npx cc-ratioZero dependencies. Reads ~/.claude/projects/ directly.
Output
cc-ratio — Tool Ratio Analyzer
================================
Sessions: 1,835 (≥5 tool calls)
Read:Edit — reads per edit — how much you read before modifying
----------------------------------------------------------------
Sessions: 379 | p10 0.7× median 1.9× mean 3.6× p90 8.0×
< 1× (more Edit) ████████░░░░░░░░ 63 (17%)
1-2× (balanced) ████████████████ 131 (35%)
2-5× (Read heavy) ██████████████░░ 116 (31%)
5-10× █████░░░░░░░░░░░ 39 (10%)
10+× ████░░░░░░░░░░░░ 30 (8%)
Write:Edit — new files per modification — builder vs maintainer
----------------------------------------------------------------
Sessions: 264 | p10 0.1× median 0.5× mean 1.5× p90 2.9×
< 1× (more Edit) ████████████████ 162 (61%)
...
Bash:Grep — executions per search — doing vs finding
-----------------------------------------------------
Sessions: 669 | p10 0.1× median 1.5× mean 7.5× p90 16.1×What it tells you
- Read:Edit median 1.9× — for every file you edit, you read nearly 2 files. The balanced zone (1-2×) is the most common (35% of sessions)
- Write:Edit median 0.5× — you modify existing files twice as often as you create new ones. 61% of sessions edit more than they create
- Bash:Grep median 1.5× — but 36% of sessions search more than they run (Grep-heavy). Heavy debugging sessions push Bash/Grep up to 447×
- Glob:Grep median 0.3× — content search (Grep) dominates file-finding (Glob) by 3:1
- Read:Bash median 1.2× — the most balanced pair. 42% of sessions run more Bash than they read
Query a specific ratio
npx cc-ratio --ratio=Read:Edit # detailed histogram
npx cc-ratio --ratio=Bash:Grep # detailed histogram
npx cc-ratio --json # raw dataAvailable ratios
| Ratio | What it measures | |-------|-----------------| | Read:Edit | Files consumed vs files modified | | Write:Edit | New files vs modifications (builder vs maintainer) | | Bash:Grep | Execution vs search (doer vs finder) | | Read:Bash | Understanding vs executing | | Glob:Grep | File-finding vs content-search |
Browser version
yurukusa.github.io/cc-ratio — drag and drop your projects folder. Includes distribution histograms for all ratios.
Part of cc-toolkit — tools for understanding your Claude Code sessions.
Source: yurukusa/cc-ratio
