Claude Code guides
How Claude Code spends tokens and how to spend fewer: what Anthropic documents, what Downshift measured, and what nobody has measured yet.
Downshift here is a Go tool for AI coding agents, not the React downshift autocomplete library and unrelated to any car transmission.
Claude Code token optimization: the levers, ranked by evidence
A map of the levers that cut Claude Code token usage: model choice, subagents, prompt cache, context and hooks. What Anthropic documents and what is unproven.
Why Claude Code token usage climbs, and how to see it
Where Claude Code tokens go: context, cache misses, subagents. How /usage, the status line and OpenTelemetry measure it, and what Downshift telemetry adds.
Claude Code usage limit running out fast: where the usage goes
Why the 5-hour and weekly limits run out: long context, cold cache, subagents. How to read /usage and what to change, per Anthropic.
Claude Code: Opus vs Sonnet vs Haiku, which model for which task
Opus, Sonnet or Haiku in Claude Code? A decision table by task type with Anthropic list prices, how subagents pick their model, and when routing helps.
Long test and build output in Claude Code: why it burns context and how to cut it
Every test and build log Claude Code reads stays in context and is sent again each turn. Cut passing output with native levers or downshift compact.
Claude Code hooks: a practical guide
Claude Code hooks explained: every event, where to configure them, exit codes, how PreToolUse can allow, deny, ask or rewrite input, plus three safe examples.
Claude Code weekly limit explained: reset, plans and what drains it
Claude Code weekly limit explained, checked 2026-10-24: how the 5-hour and weekly limits reset, what plans publish, and what drains them fastest.
Claude Code cost cheat sheet: settings, env vars and commands
Quick reference to cut Claude Code cost: slash commands, settings keys and environment variables for model, subagents, effort, compaction and prompt cache.
Is a Claude Code routing hook safe? What Downshift reads and changes
What a PreToolUse routing hook reads and changes in Claude Code, and the Downshift limits: local only, two fields rewritten, fail-open, no prompts stored.
Claude Code subagent model: which one does a subagent run on?
How Claude Code picks a subagent's model: per-call parameter, frontmatter, CLAUDE_CODE_SUBAGENT_MODEL and the main model. Precedence, pitfalls, an example.
Claude Code model routing: choosing the model per task
Which Claude Code model fits which task: renames and file lists, refactors, architecture, risky changes. A decision table and where automatic routing helps.
Rewriting a subagent's model with a PreToolUse hook
How a Claude Code PreToolUse hook can change a tool call's input before it runs, so it can set a subagent's model. Payload, updatedInput, exit codes, testing.
When Claude Code's prompt cache goes cold, and what to do
How Claude Code prompt caching works: the 5-minute and 1-hour TTL, what invalidates the cache, what a cold send costs and when keeping it warm is worth a ping.
Claude Code Router or Downshift: a gateway and a hook solve different problems
Claude Code Router is a local gateway to many providers; Downshift is a hook that picks among the session's own models. How they differ and when to pick each.
Claude Code context packing for relevant code, opt-in
Give Claude Code less but better code context: symbol-level packing under a byte budget, opt-in. What is measured (latency, bytes) and what is not (quality).
Prefer Portuguese? Read the guides in Portuguese