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 computer use: fewer tokens per desktop read
An agent that drives desktop apps reads the screen after every action. How Downshift compacts each read and sends repeat reads as only what changed.
Do Claude Code subagents burn your usage limit faster?
Each subagent starts a fresh context and its requests count toward the same limits, on your main model by default. Why Explore drains usage, and the fix.
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 applies subagent model choices within policy and the models known to the session. How they differ and when to pick each.
Keep Claude Code context small
Two ways Downshift keeps Claude Code context small: the compactor cuts clean command output to a summary and keeps failures byte for byte, and routing sends mechanical subagent work to a smaller model.
Prefer Portuguese? Read the guides in Portuguese