Long-form on agent configuration.
39 guides on the four files that ship into your context on every turn: CLAUDE.md, AGENTS.md, .cursorrules, .grokrules. Token math, Karpathy-rubric scoring, rule-firing audits, comparison pages, drift playbooks. Every guide ends with a paste-and-score CTA back to the analyzer.
Score your own file first, then come back here for the deep dive on whatever the analyzer flagged. Open the analyzer →
- What do these files actually cost?
- Every line of CLAUDE.md, AGENTS.md, .cursorrules, and .grokrules is re-sent on every turn. A 5,000-token config is a 5,000-token tax on every request, not a one-time load. We do the per-line token math on what each rule costs you.
- Why does Claude ignore half of it?
- Rules compete for attention. Past a few thousand tokens some lines stop firing reliably, and you keep paying the token cost whether they fire or not. Here is why Claude skips lines, and which to cut.
- CLAUDE.md, AGENTS.md, .cursorrules, .grokrules: which format?
- All four share the same per-turn cost model and differ on imports, defaults, and which host loads them. ccmd scores all four. Start with who pays for an AGENTS.md per turn if your repo carries more than one.
- What does ccmd grade against?
- Karpathy's 12-rule scorecard, which dropped reported mistake rate from 41% to 11%. Most files score 4 of 12. Read how the rubric scores a file, then run yours.
- 2026-05-22
Cutting the CLAUDE.md rules Claude ignores (and the ones to keep)
- 2026-05-21
AGENTS.md design decisions: the seven choices baked into the spec, and what each one costs you per turn
- 2026-05-21
Audit the silent token cost of your CLAUDE.md: four surcharges your bill never breaks out
- 2026-05-21
CLAUDE.md token bloat: the precise definition, the 28-word line, and the six things it is not
- 2026-05-21
Hooks block tool calls. CLAUDE.md rules ask nicely.
- 2026-05-21
Shared CLAUDE.md token cost in parallel: one bloated line is billed once per seat, at once
AGENTS.md (Codex / GPT-5.5)
6 guidesCodex's cross-tool agent-config spec. Same per-turn cost mechanics as CLAUDE.md, different defaults and import rules.
AGENTS.md design decisions: the seven choices baked into the spec, and what each one costs you per turn
AGENTS.md picked plain markdown, a single root file, no required fields, no @-import, nested concatenation, and a 32 KiB cap. Each decision has a measurable consequence in tokens, cache behavior, or loader semantics. Here is each one, what it bought, and what it cost.
AGENTS.md token audit cost: the four-step procedure and the one step everyone skips
An AGENTS.md token cost audit is four steps: paste, score, read three numbers, calibrate to your loader. Most audits stop at step three. The score itself is free (no signup, no upload, ~250ms in your browser). The dollar number you read off the screen is the upper bound for one specific path: Codex CLI, uncached, 30 turns, Opus 4.7 at $15 per million input tokens. Your actual bill is that number times your loader
AGENTS.md token cost per turn: one file, four hosts, four different bills
AGENTS.md does not have one per-turn token cost. The same 640-byte file is 0 tokens per turn in Cursor, 0 in Claude Code without an @-import, the entire file in Claude Code with @AGENTS.md, the entire file in Codex CLI on uncached turns, and ~10% of the file on cached Codex turns. The number belongs to the host, not the file.
Score the CLAUDE.md and AGENTS.md files you never audited
We ran ccmd
AGENTS.md and CLAUDE.md import drift: when @AGENTS.md silently doubles in size
If your CLAUDE.md is one line that reads @AGENTS.md, you are not looking at what Claude sees. Anthropic
AGENTS.md host context drift: one file, four loaders, four different system prompts
AGENTS.md is positioned as a portable spec across coding agents. The spec is intentionally one paragraph. Every host then fills in the gaps differently. Same file on disk, four different in-context payloads.
.cursorrules (Cursor)
1 guideCursor's rules file and the .mdc multi-file variant.
.grokrules (xAI Grok Build)
1 guideGrok Build's config file, native parsing in the analyzer.
Token cost and budget
16 guidesPer-turn token math, weekly quota burn, parallel agents, the Agent SDK credit split shipping 2026-06-15.
Audit the silent token cost of your CLAUDE.md: four surcharges your bill never breaks out
Your provider
CLAUDE.md token bloat: the precise definition, the 28-word line, and the six things it is not
Reddit threads use
Shared CLAUDE.md token cost in parallel: one bloated line is billed once per seat, at once
A shared CLAUDE.md is not paid once. It is re-injected every turn of every session that loads it, so a team of M engineers working in parallel pays your per-turn token count M times simultaneously. The per-turn number ccmd prints is the per-seat floor; your headcount is the multiplier nobody puts on it. Here is the math, where the file gets re-paid, and how to attribute it per engineer.
Claude Code context cost scales quadratically (the real math)
Raw input grows as N(N+1)/2 across N turns, not linearly. At 200 turns that
CLAUDE.md instruction token threshold: 28 words per rule, not 2,500 per file
Every CLAUDE.md guide quotes the file-level ceiling. The threshold that actually predicts ignored rules is per instruction, not per file. The ccmd analyzer fires at wordCount > 28, roughly 37 tokens per line, and credits back 35% of the line
CLAUDE.md template token cost: the recurring annuity nobody quotes
A starter template
Claude Code auto memory tokens: what MEMORY.md actually costs per turn, measured on a real machine
Auto memory is the cousin of CLAUDE.md every audit forgets. MEMORY.md fires on every turn but only the first 200 lines load; the rest sit on disk invisible to Claude. On a real long-lived index of 1,135 lines, only 21,677 chars (~5,400 tokens) bill per turn. Here is what that looks like on disk, what the truncation does, and how to think about the per-file follow-read cost.
Claude Code cost is set by context, not by which model you picked
Switching Opus to Haiku caps the bill at 5x cheaper. A bloated CLAUDE.md moves it 4-10x. One cache-busting line in your config flips you from $0.50/M to $5/M at the same model, a 10x swing the model-pricing table never shows. The dial is context.
claude-code-setup plugin token cost: what fires every turn vs only on invoke
Anthropic
CLAUDE.md cost with parallel agents: which surfaces multiply, and the two that do not
Fan out N parallel agents in Claude Code and your CLAUDE.md cost usually multiplies by N. Anthropic
CLAUDE.md per-turn token cost: the lookup table by file size
Your CLAUDE.md is re-sent in full on every turn, so its per-turn token cost equals its whole token count. This is a flat number you can read off a table: characters / 4 = tokens, tokens x rate = dollars. Per-turn and per-session cost by file size at Opus 4.7, Sonnet 4.6, and Haiku 4.5 rates, plus the chars/4 vs new-tokenizer gap.
CLAUDE.md token waste per turn: the seven categories of bytes billed for nothing
Every byte of CLAUDE.md is in the system prompt on every turn. Seven categories of those bytes produce zero behavioral signal. Our analyzer enumerates them as the Finding.kind union at src/lib/analyzer.ts:6. Per-category waste math, ranked by dollar impact, on Opus 4.7 at the rate the analyzer hardcodes.
CLAUDE.md weekly quota burn: the seven-day math that hits you on Wednesday
Per-turn token math hides what your CLAUDE.md actually costs you. The bill that throttles you is weekly. One 6,000-token file × five sessions × five days × thirty turns is 4.5 million input tokens before Claude has read a single line of your code. One ISO date on row 3 multiplies that by ten. The walkthrough, with the line of the analyzer that catches it.
Layered CLAUDE.md token cost: the file you pasted is one layer of the bill
An analyzer scores one pasted CLAUDE.md. Claude Code concatenates a stack at launch: managed policy, ~/.claude/CLAUDE.md, the project file, and every @import it pulls. Worked on ccmd
Nested CLAUDE.md token scope: when a subdirectory file actually costs you
A nested CLAUDE.md costs zero tokens at launch, the full file the moment Claude reads anything in its subtree, then zero again after /compact. The four token states of a subdirectory file, and why other guides stop at the first one.
CLAUDE.md context burn audit: the seven things to actually grade
Most guides say
Rules: which fire, which to cut
5 guidesWhy Claude ignores some lines on some turns, what to delete, what to keep, what to rewrite.
Cutting the CLAUDE.md rules Claude ignores (and the ones to keep)
The popular fix for a rule Claude keeps skipping is to delete it. That is backwards for most of them. ccmd
Hooks block tool calls. CLAUDE.md rules ask nicely.
A PreToolUse hook returning permissionDecision: \
CLAUDE.md silent failure audit: 7 line shapes that fail without a log
CLAUDE.md is the only piece of config in your stack that fails silently. TypeScript yells, ESLint yells, CI yells. CLAUDE.md ships every byte to Claude on every turn and then says nothing when half the rules get ignored. The audit is 7 deterministic checks against the bytes you wrote, each one a finding kind at a known line in src/lib/analyzer.ts.
CLAUDE.md conditional rules: there is no syntax for them
There is no inline conditional rule syntax in CLAUDE.md. Every line is concatenated into the system prompt at session start and fires on every turn. The five
Do CLAUDE.md rules fire on every turn? Yes, and the fix isn
Every line of CLAUDE.md is concatenated into the system prompt and re-sent on every turn. Our analyzer hardcodes that as estimatedTokensFireEveryTurn = totalTokens. But CLAUDE.md is one of four firing surfaces, and the other three (skills, hooks, MCP tool descriptions) fire conditionally. A walkthrough of which surface each kind of rule belongs on.
Audit playbooks
4 guidesRun-this-Tuesday workflows: line-firing audits, owner audits, accuracy-gain audits, memory audits.
CLAUDE.md accuracy gain audit: turn rubricPassed into a mistake-rate number
Every CLAUDE.md audit on the internet measures tokens cut. An accuracy gain audit measures accuracy bought. It converts ccmd
Claude memory audit: 8 checks that cover both files Claude reads every turn
A Claude memory audit walks two files in order: CLAUDE.md (the one you wrote, ships every byte every turn) and MEMORY.md (the one Claude wrote about you, first 200 lines load every turn). Here are the seven CLAUDE.md finding kinds the analyzer checks, the one MEMORY.md check the analyzer does not yet ship, and the order to run them in under ten minutes.
Claude Code config audit: the 12-rule scorecard your file gets graded on
A Claude Code config audit is a line-by-line score of your CLAUDE.md (or AGENTS.md, .cursorrules, .grokrules) against the Karpathy 12-rule rubric, plus seven per-line finding kinds (bloat, vague, aspirational, conflict, duplicate, missing_why, cache_bust). The rubric is what makes it an audit instead of advice.
CLAUDE.md owner audit: find the stale lines nobody owns anymore
An owner audit pairs git blame CLAUDE.md (who added each line, when) with a deterministic line-level analyzer. ccmd flags the three fingerprints stale lines leave behind: a stale timestamp, a duplicate rule, and a prohibition with no recorded reason. A repo grep and git blame name what is gone and who to ask.
Memory and context model
2 guidesNested files, subagent inheritance, plugin overwrites, recursion isolation, host-context drift.
Drift across models and teams
2 guidesSame CLAUDE.md, different models. Same repo, different engineers. What survives and what does not.
Claude Code config is project-specific by design. Here are the seven anchor points that bind it to your tree.
A Claude Code config is not a portable artifact. CLAUDE.md is a contract with seven specific anchor types in your project tree: file paths, scripts, .claude/settings.json hooks and MCP allowlist, @import targets, subdir CLAUDE.md, incident references, and stack lines. Copy it to another repo and each one breaks silently. Where each rule actually belongs, and what transfers vs. what doesn
Cross-model CLAUDE.md drift: the same file does not cost the same on Opus, Sonnet, and Haiku
Type /model in Claude Code and the file on disk does not change. The bill it produces, the rules it is allowed to enforce, and the cache it lives in all do. Most analyzers normalize cost to Opus, including ours, so the number you stare at is one specific model
Claude Code basics
1 guideSetup, latency, skills, and the things newcomers ask before they hit the first weekly limit.
Other essays
1 guideStandalone pieces that didn't slot into a cluster.
Pick a guide, or skip the reading and paste your own file into the analyzer. Same rubric, applied to your actual config in under a second.