Claude Code tips, run before they ship.
Every recipe here was run in a real Claude Code session first. The cost, the diff and the pass or fail of each check are published next to the advice, and re-tested when Claude Code updates.
| Model | All checks | Avg cost | Avg time |
|---|---|---|---|
| Haiku | 3 of 3 | $0.009 | 28s |
| Sonnet | 3 of 3 | $0.105 | 27s |
| Opus | 3 of 3 | $0.221 | 42s |
Claude Code 2.1.296 · 13 Oct 2026 · full run data
Latest recipes
All recipes →- Verified
$0.051 vs $0.073per run, a 9-line decisions-only CLAUDE.md vs an 84-line full description (all 9 runs avoided the trap)
Should your CLAUDE.md describe the code, or just the decisions? We tested 3 versions
Same task, same planted trap, 9 runs: no CLAUDE.md, a 9-line decisions-only file, and an 84-line full description. Sonnet avoided the trap and passed the hidden test in all 9. The decisions file was the cheapest at $0.051 a run; the full description cost $0.073, 43% more.
- Verified
$0.30API cost for Claude Code to build it: 2 prompts, 126 seconds
We had Claude Code build a cost tracker. It took 2 prompts and $0.30.
Claude Code (Sonnet 5.5) built cc-cost, a small CLI that reads its own session logs and prints API spend per day and per session. It took 2 prompts, 126 seconds and $0.30. Its tests passed the first time, but the real logs turned up an undercount the tests missed. After one fix it matched Claude Code's own cost totals on 76 of 86 real sessions.
- Verified
$0.649 vs $0.283per run, the full Opus + Sonnet + Haiku setup vs Sonnet alone (2 of 3 vs 3 of 3 passing)
Opus plans, Sonnet builds, Haiku searches: the mix cost 2.3x Sonnet alone
We tested the viral 'run Opus, Sonnet and Haiku at once' Claude Code setup against plain Sonnet on the same 3-step feature in a 164-file repo. Sonnet alone passed every check in 3 of 3 runs for $0.283 a run. The full mixed setup passed 2 of 3 for $0.649, and Haiku did 1.8% of the work.
- Verified
0 forksin 9 runs with forking on by default; Claude did all the work itself
Claude Code forks subagents by default now. In 9 runs, it never forked
Claude Code turned on fork subagents by default in claude -p. On a 164-file repo with a three-step job, Claude never forked or delegated once in 9 runs. Forks on cost $0.218 a run, forks off $0.245, and with subagents denied $0.305.
- Verified
14% cheaperto stay in one session on a 197-file repo; every hidden test passed both ways
/clear on a bigger repo: one session was still cheaper
We reran our /clear test on a 197-file codebase with 14 feature modules, up from 24 files last time. All 24 hidden-test checks passed both ways. Staying in one session cost 14% less ($0.137 vs $0.159 a run).
- Verified
5 of 5 eachruns passed every hidden test; $0.054 and 18s a run for Sonnet 5.5, $0.127 and 148s for Kimi K3.1 Pro
Kimi K3.1 Pro vs Sonnet 5.5 in Claude Code: same score, Kimi cost 2.4x as much and took 8x as long
We ran the same tricky billing-date task 10 times in Claude Code, 5 with Claude Sonnet 5.5 and 5 with Kimi K3.1 Pro through Moonshot's Anthropic-compatible endpoint. All 10 passed every hidden test. Kimi checked its work more often, but averaged $0.127 and 148 seconds a run against $0.054 and 18 seconds for Sonnet.