Tips from the community
Things people who use Claude Code every day have worked out, gathered from forums, threads and write-ups. None of this is official, and some of it will be wrong or version-specific. Every tip says which it is, and links to where the claim was made.
The lessons are the opposite of this page: every claim there is pinned to a Claude Code version and to Anthropic’s own documentation. Here you are reading hearsay with its receipts attached — useful, and to be weighed rather than followed.
The official documentation describes the mechanism this relies on. The technique itself is community practice.
- Medium effort: one report measured 45% fewer output tokensL15 min
One practitioner ran five real coding tasks at effort high then medium: ~26,000 vs ~14,300 output tokens, a ~45% cut, all five completed with no quality drop visible by eye. The docs confirm the mechanism (thinking bills as output) but publish no measurement.
- The Sonnet limit strands you on the expensive modelL14 min
Hitting the Sonnet family limit leaves Opus as the only model with quota, and the documented fix — switching families with /model — spends your remaining shared weekly allowance at the pricier rate. Check the weekly bar in /usage before you switch, not after.
- Version ~/.claude, but get the ignore file right firstL16 min
Versioning ~/.claude in git backs up months of config tuning, but needs an exclusion list in danger order — credentials first, ~/.claude.json and prompt history second, runtime state third — and the popular projects/**/*.jsonl carve-out leaks superseded transcripts.
- Guard the default branch with a PreToolUse hookL26 min
A PreToolUse hook on the file-editing tools that exits 2 when you are on the repository's default branch turns "Claude quietly edited main" into a message Claude reads and acts on — but it is a nudge, not a boundary, since Bash writes bypass it and a timed-out hook fails open.
- There is no .claudeignore fileL24 min
`.claudeignore` is not a Claude Code feature — it is inert. The documented ways to keep Claude out of a path are `.gitignore` (already respected by content searches) and `Read` deny rules in `.claude/settings.json`.
- Write skill descriptions in third person, with non-triggersL25 min
Community skill repos say to write the description in third person and name explicit non-triggers. The non-trigger half matches skill-creator's should-trigger/should-not-trigger tuning; the voice rule is undocumented, and Anthropic's own examples break it.
- Big model at low effort beats small model at maxL35 min
When a task needs real intelligence but also needs to be fast, turn the effort dial down on the bigger model instead of switching to a smaller model at max effort.
- Cap auto-compact well below the model's real windowL35 min
On a 1M-context model, deliberately set the auto-compact window to a fraction of the real window — one practitioner runs 400K on 1M and reports the full window degraded quality. The knob is documented; the value is a judgement call nobody has published a measurement for.
- Cost is a session-tail problem, but token share is not cost shareL36 min
Spend concentrates in a few long, uncleared sessions, as the docs say. But the corollary that output tokens are a rounding error is arithmetic error: cache reads bill at ~10% of the input rate, so in the docs' /usage example output is 0.53% of tokens and 14% of the cost.
- When it feels like Claude Code got worse, audit cache and clutter firstL36 min
Before concluding the model changed, check two documented self-inflicted causes: a prompt-cache miss after an idle gap on a large context window, and skills, subagents and MCP servers loading into every session. Both are measurable from inside the product.
- Route to the right skill with a scoring hookL36 min
Past a dozen skills, description matching picks the wrong one. A UserPromptSubmit hook can score each prompt against a checked-in rules file (keywords, path patterns, intent regexes) and inject a suggestion: the routing is deterministic, the invocation still is not.
- Don't set subagentPromptCacheTtl to 1h to fix subagent cache missesL35 min
Setting subagentPromptCacheTtl to 1h pays the higher cache-write rate on every short helper request to rescue the few that idle past five minutes; the real leak is the parent's cache going cold while it blocks on a child, which promptCacheTtl fixes.
- Watch the 5-hour block burn, not just the session totalL36 min
Claude Code writes every session to plaintext JSONL under ~/.claude/projects/, and the community tool ccusage parses those files locally into daily/monthly/session reports and a live 5-hour-block dashboard — no API key, nothing leaving the machine.
- Verify with a signal the agent does not controlL46 min
"Tests pass" and "training complete" are written by the same turn that wanted to be finished — confirm with a quantity that cannot exist unless the work happened, such as wall-clock elapsed time, GPU utilisation, a row count, or the `duration_ms` a PostToolUse hook receives.
- Design your tooling for an agent: crash loudly, never hangL56 min
The highest-leverage change is often the project's own tooling rather than the prompt: make commands fail fast and loudly instead of hanging, guard dev-server targets with a pidfile, and tee output to log files the agent can read.
- Enforce invariants with a failing test, not a warningL56 min
A rule you have had to repeat in CLAUDE.md is a missing test: encode it as a script that exits non-zero and wire it into a hook, because the docs state plainly that CLAUDE.md is advisory while hooks are deterministic.
- Gate the bot on a test that fails before the fixL56 min
Don't let an agent finish on "tests pass" — require a test that fails on the pre-fix revision and passes on the fix, so the test provably covers the bug.
- Make your toolchain's errors legible to the agentL56 min
Treat build, test and CI output as an interface the agent reads: put the informative error before the noisy generic one, and give the agent a way to fetch CI logs itself.
- Aim for 40-80 lines of CLAUDE.md, not 200L65 min
The documented 200-line CLAUDE.md figure is a ceiling, not a target — practitioners measuring compliance land nearer 40–80 lines, and blog-level corpus analysis puts well-performing agent-instruction files around 300–350 words.
- Subagents return conclusions, not the reasoning behind themL65 min
A subagent hands back its summary, not the intermediate reasoning that produced it — so fanning one feature across several subagents throws away the understanding you were paying them to build.
- Cap subagent nesting before it caps your quotaL85 min
Subagents can spawn their own subagents three layers deep by default, so one prompt can fan out into a tree you never see; cap it with CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH or by withholding the Agent tool per subagent rather than trusting the default.
- Give agents the leaf nodes, keep the task graphL85 min
Author the task dependency graph yourself and hand agents only leaf tasks: the shared task list enforces the dependencies, but from v2.1.233 the Task tools are off by default on Opus 4.8 and Sonnet 5, so a team falls back to the agent-to-agent chatter the report calls a mess.
- Prefer a fresh session over a subagentL85 min
Subagents are sold as the way to protect context, but heavy users report better results from simply starting a fresh session when the delegated work will write files rather than just read them — delegate the reading, do the writing yourself in a clean context.
- Race the same prompt across four checkoutsL85 min
Instead of arguing about which model or phrasing to use, run the identical prompt in several isolated checkouts on different models at once and keep the best result — the docs give you the isolation and the per-session model switch, but never suggest using them as a bake-off.
- The Ralph loop: fresh context every iterationL86 min
Re-running one prompt file through `claude -p` in a shell loop — one task per iteration, each starting from empty context — is a build strategy, not just a batch trick: the loop's job is to keep the context window small rather than to remember.
- Send a second wave of subagents to attack the first wave's findingsL86 min
Run review subagents in parallel, each on a different axis, then spawn a second round whose only job is to falsify round one's findings — the adversarial second pass is what removes the false positives.
- Subagent fan-out can cost more than one sequential sessionL86 min
Parallel subagent fan-out can cost more total tokens than doing the same work in one sequential session: each subagent pays for its own uncached system prompt and tool prefix, reloads the CLAUDE.md hierarchy and git status, and re-reads files its siblings already read.
- Two or three parallel sessions is the real ceilingL85 min
Practitioners report 2-3 concurrent worktree sessions as the working maximum, because the bottleneck is your review capacity, not Claude's throughput.
- Worktrees isolate files, not your database or portsL85 min
Git worktrees isolate files only: parallel Claude Code sessions still share one local dev database, one set of localhost ports, and one credential store, so migrations from two branches leave a schema matching neither and no git conflict appears.
- "MCP eats your context" is stale — the new failure is invisible toolsL96 min
Pruning MCP servers to save context is mostly obsolete advice now that tool search defers tool schemas; the live risk is the opposite — Claude writes a script for a job an installed MCP tool already does, because it never saw the tool.
- Ask for a walkthrough.md before you ask for changesL115 min
On an unfamiliar or agent-written codebase, have Claude write a linear walkthrough of the whole system to a file before you ask for any change — a durable artefact you can re-read, re-feed, and audit, unlike an explanation that scrolls away with the session.
- Settle design arguments with three PRs, not a whiteboardL116 min
When a team disagrees about an approach, have Claude build the competing implementations as real PRs in separate worktrees and compare the diffs, instead of arguing it out in a design doc.
- Track survival rate, not acceptance rateL125 min
Judge a Claude Code rollout by how much of the generated code is still in the tree weeks later, not by the accept rate on the dashboard — which by its own documentation stops counting the moment a suggestion is accepted.
- Audit your startup context before you blame the model5 min
One reported `/context` audit found 51,400 tokens loaded before the first prompt; disabling four third-party plugins and turning off auto memory recovered roughly 10,000 of them, while deleting an individual skill saved about 100.
- Curate the committed allowlist; local grants stay local4 min
Keep .claude/settings.json a curated, reviewed allowlist; let settings.local.json collect exploratory grants, then promote the durable ones and delete the rest. Also gitignore the local file in the repo: Claude Code's auto-ignore goes to your global excludes, which no clone gets.
- When Claude Code feels dumber, check your effort level before your prompts5 min
A vendor postmortem reportedly traced the spring 2026 quality drop to three dated product changes rather than to quantization; the durable and documented lesson is that a saved effort level and a stale CLI version are the first two things to check when output quality falls.
Reported by people who use Claude Code heavily. We have not reproduced it, and it may be version-specific or plain wrong.
- /context may over-state MCP token costL35 min
A developer measured a server that `/context` reported at 45,018 tokens as costing 15,282 tokens in a single batched `count_tokens` call, and attributed the gap to per-tool summation re-counting the ~313-346-token tool-use preamble once per tool.
- CLAUDE.md: presence matters, formatting may notL66 min
A 1,650-session study found CLAUDE.md length, position, nesting and self-contradiction had no measurable effect on adherence; only presence did (0% to 68%). The docs say the opposite, so treat both as unproven and restate the rule in your prompt when editing or late in a session.
- Daily degradation trackers are too small to trustL125 min
Public trackers charting Claude Code "degrading" day to day are underpowered: 50 tasks once a day carries a day-over-day uncertainty of about +/-20 points, wide enough to explain most visible movement and unable to separate a model change from a harness, prompt or load change.
This advice is common and does not hold. The official page saying otherwise is linked below.
- A hook returning block: true blocks nothingL26 min
Community hook configs return a top-level block: true and message to stop a tool call, but neither field exists in Claude Code's hook schema — what blocks is exit code 2, decision: "block" with reason, or PreToolUse hookSpecificOutput.permissionDecision: "deny".
- Tool search did not retire MCP pruningL25 min
Tool search defers MCP tool definitions by default, so unused servers no longer cost you full schemas on every turn — but the docs still tell you to disable servers you are not using, because tool names and server instructions load every session regardless.
- "/clear kills your prompt cache" is a bad reason to avoid itL35 min
"/clear kills your cache" is a bad reason to avoid it: the docs say /clear costs nothing when you want a fresh start, and /compact is the request that reads the whole conversation - though a warm-cache /compact reads its prefix from cache and costs a fraction of that.
- Your context is not mostly full before you typeL35 min
Idle MCP servers and an inherited CLAUDE.md do not fill your context before you type: the docs' startup itemization totals about 7,850 tokens, MCP tool names just 120, because tool definitions are deferred by default. Keep running /context; the 33k figure is not yours.
- "Slash commands go unused" rests on two frictions that are goneL55 min
Most of a hand-built slash-command library goes unused - but the two reasons the best-known writeup gives, no argument passing and no way to inject git context, are both fixed now, so check the reasons before inheriting the conclusion.
- Subagent spend is not invisible — you are reading the wrong meterL85 min
Subagent tokens are not invisible to Claude Code. Only the prompt cache line is main-conversation-only; /usage attributes usage to subagents by name and the agent panel shows a live per-subagent token count. /context excludes them by design, not as a gap.
- $CLAUDE_TOOL_INPUT_FILE_PATH is not a real variableL94 min
Popular community hook configs guard on $CLAUDE_TOOL_INPUT_FILE_PATH, a variable the docs never mention; it expands to empty, the guard never matches, and the hook exits 0 having formatted nothing.
- The git guard exists — it is auto-mode onlyL106 min
Claude Code's docs do name git reset --hard, git clean -fd and git checkout -- . as blocked by default, but only by the auto mode classifier: in Manual, dontAsk, or under a broad Bash(git *) allow rule nothing stops them, and /rewind cannot recover the work.
- The worktree sweep is not what eats your workL115 min
Claude Code's worktree sweep skips any worktree holding changed files, untracked files, or unpushed commits, so the timer is not the risk: the exit prompt and git worktree remove --force delete the directory, its branch, and everything uncommitted. Commit before you leave.
- The API-vs-subscription math depends on which cost distribution you're in5 min
Viberank's 1,102 self-submitters put median API-equivalent spend at $1,479/month; Anthropic's docs put the enterprise average at $150-250/developer/month. Neither median decides API vs a $200 seat - only measuring your own spend does.
- Budget CLAUDE.md in instructions, not lines5 min
Community configs treat CLAUDE.md as a fixed instruction budget, not a line budget: every rule added makes every other rule less likely to be obeyed. The reframe is sound, but two rules repeated with it - never put code style in CLAUDE.md, never use /init - contradict the docs.
- There is no /limit-reset — the hidden command is /rate-limit-options4 min
No /limit-reset command appears anywhere in the Claude Code docs, which document hidden and plan-gated commands openly; the real menu-hidden command at a usage limit is /rate-limit-options: wait and continue, add credits, or upgrade.