Claude Code Guides: CLAUDE.md, Model Routing, Cost Control
Claude Code is Anthropic's terminal coding agent. These guides cover CLAUDE.md files, model routing, hooks, cost tracking, and keeping workflows stable. Below are all 15 guides on Claude Code published on this site, newest first, each one a hands-on walkthrough with configuration you can copy.
All Claude Code guides (15)
Moonshot’s 2.8T open-weight model runs for agentic coding two ways: routed into Claude Code via one env block, or the native Kimi Code CLI. Pricing, benchmarks, local-run reality, and an honest hybrid verdict.
HalluSquatting turns predictable AI hallucinations into malware delivery. Why lockfiles and cooldowns do not stop it, plus the PreToolUse hook, sandbox config, and .npmrc settings that do.
Sol Ultra puts subagent orchestration inside the model. What cooperative subagents are, GPT-5.6 pricing and Codex availability, the METR cheating flag, and how it compares to Claude Code dynamic workflows.
Fable 5 launched at 2x Opus 4.8’s price alongside the new fallbackModel setting. Chain configuration, the safety classifier that reroutes sessions to Opus 4.8, and a task routing table for all three models.
Dynamic workflows fan a task across up to 1,000 subagents. Which tasks justify the cost, how to bound the agent count, what ultracode costs, and when a single session still wins.
Three tiers of persistent memory in 2026: CLAUDE.md, MCP servers (agentmemory, claude-mem), and Anthropic’s Memory tool plus Dreaming. Benchmarks and a decision matrix.
Gemini 3.5 Flash beats Gemini 3.1 Pro on agent benchmarks at $1.50/$9 per 1M tokens. When to route tasks from Claude Code, the thinking_level trap, and a 40-line MCP agent.
Gemini CLI stops on June 18, 2026. Step-by-step migration to the new agy binary, free-tier rate-limit math, and when to switch to Claude Code or Codex CLI instead.
Claude Code 2.1.120 added claude ultrareview as a non-interactive CLI subcommand. The OAuth token gotcha, a copy-pasteable GitHub Actions workflow, --json parsing with jq, and a cost control playbook.
Three MCP servers can eat 72% of a 200K context window. The code execution pattern compares against dynamic toolsets and Tool Search, with a working Python build and Claude Code v2.1.121 alwaysLoad config.
After Anthropic’s April 2026 postmortem revealed three Claude Code regressions, here is the practitioner playbook: pin the CLI, lock effort, allowlist models, add a regression-detecting stop hook, keep fixtures.
Defend Claude Code workflows against the April 2026 Comment and Control CVE. Tool allowlists, OIDC via Bedrock, script caps, egress blocks, and a before/after hardened workflow.
Workflow YAML, false positive tuning, token cost math, and a layered pipeline with Semgrep and Snyk for Anthropic’s official security review action.
Track what you spend in Claude Code with built-in commands, hidden JSONL logs, and tools like ccusage. Plus 7 tips to cut token costs by 50%.
Real production CLAUDE.md examples from my Next.js site. Learn the anatomy of an effective file, 7 common mistakes, and when to use hooks vs CLAUDE.md vs custom commands.
Explore other topics
Every guide on this site is grouped into one of these hubs.
Looking for everything at once?
The full archive lists every article in publication order, across all seven topics.