Topic
coding
6 posts · 6 articles
Articles

Cut your Claude Code cost in half with one routing rule
Most of a Claude Code bill is Opus doing work Sonnet handles fine. Here is the routing rule that fixes it, plus how to confirm caching works.

Get Claude Code to write tests you'll keep
Claude Code writes tests that pass without checking anything. Write them before the code, lock the assertions, and keep the tests worth running.

Claude Code sub-agents: when to spawn one (3 cases)
A sub-agent runs in its own context window and hands back a summary. Here is the one rule for when to spawn one, with three worked examples.

Run two Claude Code sessions in one repo with worktrees
Claude Code has a native -w flag for git worktrees. Run a refactor and a feature in parallel, each in its own files, with no merge pain.

Claude Code agent loop: 3 causes and the fix
Claude Code looping on the same edit means one of three things: lost context, a failing command, or a vague task. Here is the fix for each.

How to write a CLAUDE.md that changes Claude Code's behavior
The five sections that shift how Claude Code works in your repo, plus what to leave out so the file stays under 200 lines.