CLAUDE.md in Practice: What It Controls and What It Costs
In short
- CLAUDE.md is the file Claude Code reads at the start of every session in a project. It is context, not configuration: Anthropic's docs say it is not enforced, and that rules which must always hold belong in hooks or permission settings.
- Early research is mixed. On real coding tasks, context files did not reliably raise success and added over 20 per cent to cost; another study found shorter runs with similar results. Files written by people beat files generated by a model.
- My two largest files, for Jile and FinTFM, reached 760 and 720 lines: 3.8 and 3.6 times Anthropic's target of 200. Most of their sections cite the incident that prompted them. The largest share of lines goes to releases in Jile and to rules about evidence in FinTFM.
- Splitting FinTFM's file by the current guidance would keep 220 of its 712 section lines in every session and move the rest to path-scoped rules, skills, hooks, linter settings and docs.
- The recipe: a short root file with commands and the facts the code hides; rules for one language or folder; skills for procedures; hooks and permissions for anything that must always happen.
A coding agent starts each session knowing nothing about your project. It does not know that the tests need a flag, that prices are stored as integers, or that it broke last week's release by staging the wrong files. CLAUDE.md is where Claude Code looks for that knowledge. It is a plain Markdown file, and it fails in two ways: too thin, and you repeat yourself every session; too long, and the rules that matter drown among the ones added once and forgotten.
This post covers how Claude Code loads the file, what published studies say about whether it helps, and what eleven of my own projects show, two of them far past the recommended size. It ends with recipes: templates, a path-scoped rule, a skill, a hook and a small CI check, each checked against the current documentation and tested where it can run.
What CLAUDE.md is, and what it is not
Anthropic calls it "a special configuration file that lives in your repository and provides Claude with project-specific context", and adds: "Your CLAUDE.md file becomes part of Claude's system prompt." Every session in the project starts with it loaded.
"Configuration" is the misleading word. The memory documentation is explicit: "Claude treats CLAUDE.md files and auto memory as context. They aren't enforced configuration. To block an action regardless of what Claude decides, use a PreToolUse hook instead." The best-practices page gives the consequence: "A line like Always typecheck before you finish in this file works most of the time, not every time." A line in CLAUDE.md is advice the model weighs against everything else in its context. That suits judgement calls and is weak for hard limits.
Two neighbours do similar jobs. AGENTS.md is an open format read by several coding agents; Claude Code reads it only as a fallback: "By default, Claude reads AGENTS.md only when you have no CLAUDE.md in your working directory or above it." And auto memory holds notes Claude writes for itself, covered near the end.
How Claude Code loads it
There are several CLAUDE.md files at different scopes, and they add up rather than replace each other: "All discovered files are concatenated into context rather than overriding each other." Files above the working directory load at launch. "Files in subdirectories load on demand", once Claude reads or edits a file there.
| File | For | Loaded | In git |
|---|---|---|---|
| Managed policy file (a system path) | Everyone on the machine | Every session; cannot be excluded | No, set by IT |
~/.claude/CLAUDE.md, ~/.claude/rules/ | You, in every project | Every session | No |
CLAUDE.md in the project root or .claude/ | The team | Every session, with each CLAUDE.md above the working directory | Yes |
CLAUDE.local.md | You, in this project | Every session | No, ignored |
.claude/rules/*.md | The team | Every session; with paths:, only for matching files | Yes |
A subdirectory's CLAUDE.md | One part of the tree | When Claude reads or edits a file there | Yes |
Auto memory MEMORY.md | You, in this project | Every session: the first 200 lines or 25 KB | No, stays on the machine |
Six details from the documentation shape how to write the file:
- Size. "target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence." Claude Code warns at startup when a file passes that. The only hard limit is far away: it "skips a file over 4 MiB".
- Imports. A line such as
@docs/testing.mdpulls in another file, up to "a maximum depth of four hops". Imports organise text but save nothing: imported files "load together with the CLAUDE.md that imports them." - Path-scoped rules. Files in
.claude/rules/with apaths:list "only load into context when Claude works with matching files, reducing noise and saving context space." - Contradictions. "if two instructions contradict each other, Claude may pick one arbitrarily." With several files concatenated, this happens by accident.
- Checking.
/memorylists the instruction files and opens them for editing./context allshows what is actually loaded, under "Memory files"; a file missing there does not exist for Claude. - Starting.
/initdrafts a file from the codebase. Anthropic's advice: "Think of /init as a starting point, not a finished product."
What it costs
Everything that loads at session start is paid for in every session, relevant or not. The best-practices page says so directly: "every line in it takes a little of Claude's attention on every task, whether it's relevant or not." A rough measure is size. At about four characters per token, my 760-line file is roughly 12,700 tokens; on a 200,000-token context window, that is about 6 per cent used before the first question. A 22-line file is a few hundred tokens.
Tokens are the smaller cost. The larger one is attention. Anthropic's engineering post on context describes the goal as "the smallest possible set of high-signal tokens that maximize the likelihood of some desired outcome", and notes that "CLAUDE.md files are naively dropped into context up front" while other information is fetched when needed. A rule that applies to one folder, loaded for every task, dilutes the rules that apply everywhere.
What the evidence says
Research on context files is new. Most of it is preprints from 2025 and 2026 with small samples, so treat the table as early results.
| Study | Sample | Finding |
|---|---|---|
| Chatlatanagulchai et al., 2025 (preprint) | 253 Claude.md files, 242 repositories | Build and run commands in 77.1 per cent, implementation details in 71.9, architecture in 64.8; security in 8.7 |
| Chatlatanagulchai et al., 2025 (preprint) | 2,303 context files, 1,925 repositories | Files "evolve like configuration code through frequent, small additions" |
| Gloaguen et al., 2026 (preprint) | SWE-bench tasks and a new 138-instance benchmark | No reliable gain in success; cost up by over 20 per cent; hand-written files beat generated ones |
| Lulla et al., 2026 (preprint) | 10 repositories, 124 pull requests | With AGENTS.md: median runtime down 28.64 per cent, output tokens down 16.58 per cent, similar completion |
| Jaroslawicz et al., 2025 (preprint) | 500 keyword instructions, 20 models | The best models stayed near-perfect to about 150 instructions, then declined; 68 per cent at 500 |
| Liu et al., 2023 | Question answering over long contexts | Accuracy is highest when the relevant text is at the start or end, lowest in the middle |
What people write. In 253 public files, the most common content was how to build and run the project, then implementation notes and architecture; security and performance were rare. A later study of 2,303 files describes them as artifacts "that evolve like configuration code through frequent, small additions." My files grew the same way.
Whether they help. Gloaguen and colleagues ran coding agents on real tasks with and without context files: "providing context files does not generally improve task success rates, while increasing inference cost by over 20% on average." Files written by developers did better than generated ones, and the authors found the files useful "for specifying non-standard coding practices", but not as overviews of the repository. Lulla and colleagues, measuring efficiency, found shorter runs and fewer output tokens with an AGENTS.md. Read together: a file that states what the agent cannot discover saves it searching; a file that repeats what it could read anyway only costs.
Why length hurts. Liu and colleagues found that models use information best at the start or end of a long context and worst in the middle. Jaroslawicz and colleagues gave models up to 500 simple instructions at once; the strongest stayed near-perfect to about 150 and then declined. That benchmark asks for keywords in a report, not for following coding rules, so it is an analogy, not a limit. The widely quoted claim that models follow "~ 150-200 instructions" comes from a practitioner blog's reading of that paper, not from the paper.
What eleven of my files show
Each of my projects that uses Claude Code has a CLAUDE.md. Nine are small. Two are not:
| Project | Lines | Words | Tokens (rough) | Commits |
|---|---|---|---|---|
| Jile (Y-DNA tree) | 760 | 7,689 | about 12,700 | 49 |
| FinTFM (research model) | 720 | 6,917 | about 10,900 | 41 |
| Santa 2026 (Kaggle) | 70 | 806 | about 1,400 | 14 |
| Smart buildings (Kaggle) | 61 | 548 | about 900 | 3 |
| Quantum circuits (Kaggle) | 62 | 563 | about 1,000 | 2 |
| CASMI 2026 (Kaggle) | 58 | 592 | about 1,000 | 8 |
| PLE agent harness (Kaggle) | 76 | 808 | about 1,300 | 2 |
| CircassianDNA site | 35 | 706 | about 1,300 | 7 |
| Citewatch (VS Code) | 14 | 156 | about 200 | 1 |
| Jobwatch (VS Code) | 15 | 167 | about 300 | 1 |
| Tokenwatch (VS Code) | 10 | 117 | about 200 | 2 |
The token column divides characters by four, so it is rough; the exact count depends on the tokeniser.
Neither was planned at that size. Jile's file started at 213 lines and FinTFM's at 95. Both grew by small additions after something went wrong. The commit messages read like an incident log: "Document today's session as a postmortem", "Fix the openspec test I pushed broken, and the habit that hid it", and one recording that a fetch job died after its script was edited while it ran. A pattern search finds a dated incident, a version or a failure in 13 of Jile's 19 sections and 24 of FinTFM's 29.
The content is less typical than the growth. Both files have build and test commands, as three files in four do in the large study. But the largest category in FinTFM, and the second largest in Jile, is rules about evidence: label every number by how it was produced, re-read a figure before quoting it, score on the benchmark the project claims before the convenient one. In research code the costly failures were rarely crashes. They were plausible numbers that were wrong, and the files grew where that happened.
Anatomy of a rule that works
The sections that worked best share a shape. One from FinTFM, whose repository is public, shortened:
## A backgrounded shell command does not inherit your `cd`
**Symptom: a background job you just launched fails instantly with `ModuleNotFoundError`
or `No such file or directory`, or a running job's PID reads as dead when it is not.**
On 2026-09-26 this hit three times in one session ...
The tool's own `cd` inside a foreground command does not persist to a background one
issued later in the same turn ... **Put `cd /absolute/path &&` inside the backgrounded
command itself**, every time, rather than relying on an earlier `cd` in the transcript.
A second example comes from Jile, whose code is private, so I describe it rather than quote it. The rule says never to edit a shell script while it runs. It explains why (Bash reads a script by byte offset, so an in-place edit moves the point where the running shell resumes), records the date a fetch job died from it, gives a one-line pgrep check, and names the safe alternative: write a new file and mv it into place, which leaves the running copy untouched.
Both have five parts: the symptom as the agent will see it, the incident with a date, the cause in a sentence or two, the rule in bold, and a check or safe alternative. The symptom lets the rule fire at the right moment. The cause lets the agent apply it to cases the author did not foresee. The date lets a later reader judge whether it still applies. Anthropic's test for what earns a place is the same idea in one line: "Anything you've had to correct twice already".
Rewriting weak rules
Most weak lines fail the same way: they state a value the model already holds, or an aim with nothing to check. A stronger line names a boundary, a command, a hidden fact or a pointer.
| Weak | Stronger | What changed |
|---|---|---|
| Write clean, maintainable code. | Domain code in api/domain/ imports no web framework or database driver; import-linter enforces it. | A boundary, and the tool that checks it |
| Always run the tests. | Run make check before saying a change is done; it runs what CI runs. | An exact command, and a definition of done |
| Be careful with money. | Prices are integers in minor units; never use floats for money. | The fact the code hides |
| IMPORTANT: never touch production. | A permission rule that denies the deploy command, or a hook that blocks it. | A must-rule moved out of prose |
| Follow our release process. | Releases: use the /release skill. | A pointer instead of a procedure |
| Don't break background jobs. | The symptom, the cause and the fix, as in the FinTFM example above. | Something the agent can recognise and act on |
What to put in, and what to leave out
For each line, ask whether Claude could find it by reading the code. If it could, the line costs attention and buys nothing.
| Put in CLAUDE.md | Leave out |
|---|---|
| Exact commands to build, test, lint and type-check | What Claude can read from the code itself |
| Facts the code hides: units, frozen folders, generated files | Standard conventions of the language or framework |
| Decisions made outside the repository, with a pointer to the ADR | Long procedures (make them skills) |
| Anything you have had to correct twice | Rules a linter, type checker or hook can enforce |
| How to report results: measured, simulated or estimated | Secrets, and anything you would not publish |
| Where the other instructions live (rules, skills) | Personal preferences (they belong in your user file) |
A root file that follows this can be short. This one covers a service in three languages in 22 lines:
# Project: ledger service (Python API, Rust pricing core, TypeScript UI)
## Commands
- Python: `uv run pytest -q` · `uv run ruff check .` · `uv run mypy src`
- Rust: `cargo test --workspace` · `cargo clippy --all-targets -- -D warnings`
- TypeScript: `pnpm test` · `pnpm lint` · `pnpm typecheck` (run from `web/`)
- Everything CI runs: `make check`. Run it before saying a change is done.
## Layout and boundaries
- `core/` (Rust) prices trades; `api/` (Python) calls it through `api/pricing.py` only.
- Domain code in `api/domain/` imports no web framework or database driver; import-linter enforces it.
- Architecture decisions live in `docs/adr/`; read the relevant one before changing a boundary.
## Things the code will not tell you
- Prices are integers in minor units everywhere; never use floats for money.
- `legacy/` is frozen: read it, do not edit it.
- Test data in `tests/fixtures/` is generated by `scripts/make_fixtures.py`; regenerate, never hand-edit.
## Working agreements
- State how every number you report was produced: measured, simulated or estimated.
- Ask before deleting data, rewriting history, or anything that leaves this machine.
- Language rules are in `.claude/rules/`; procedures (release, migration) are skills.
Every line is a command, a boundary or a fact the code hides. There is no "write good code", no tour of the folders and no procedure longer than one line.
CLAUDE.md is one tool among eight
Most of the length in my large files came from asking one file to do several jobs. Claude Code and the repository's own tooling have a separate mechanism for each. They differ in two ways that matter: when they act, and whether they are enforced.
| Mechanism | When it acts | Enforced | Use it for |
|---|---|---|---|
| CLAUDE.md | Every session | No | Commands, boundaries, facts the code hides |
Path-scoped rule, in .claude/rules/ | When matching files are touched | No | One language's or one folder's conventions |
Skill, in .claude/skills/ | When invoked or relevant | No | Procedures: release, migration, review |
Subagent, in .claude/agents/ | When delegated, in its own context | No | A separate investigation or review |
Hook, in settings.json | At set points, such as before a tool call | Yes | Blocking risky commands, formatting after edits |
Permission rule, in settings.json | Before every tool call | Yes | Files and commands that are off limits |
Auto memory, in ~/.claude/ | Index loaded every session | No | Corrections and preferences Claude saves |
| Linter, tests, CI | On every run | Yes | Style, types and behaviour a tool can check |
The "Enforced" column is the one to read. Anthropic: "If something has to happen every time, make it a hook, a deny rule, or a managed setting. CLAUDE.md is for guidelines, and Claude is allowed to decide a guideline doesn't apply." Hooks give "deterministic control: certain actions always happen rather than relying on the LLM to choose to run them." And when a rule keeps being ignored, "adding IMPORTANT probably won't fix it. Either the file has grown long enough that the line gets lost, or the line is a rule that can't have exceptions, in which case it belongs in a hook."
Order matters. A rule that must always hold should not be a sentence in a prompt if a tool can enforce it, and the tool need not belong to Claude Code. A rule about commit authorship can be a sentence in several CLAUDE.md files, or one git commit-msg hook that refuses a commit with the wrong author address. The sentence competes with everything else in context; the hook does not.
A worked split
To see what the guidance means for a real file, I assigned each of FinTFM's 29 sections to the mechanism the flow suggests. It is a plan on paper, not a change to the repository, and the assignments are my judgement.
The 220 lines that stay are the core rules: how to report a number, which Python to use, that the machine is shared, never to truncate a validator's output. Tightened, they fit under 200. Procedures (releases, environment setup, evaluating a model, closing a spec task) become skills. Two rules become enforcement, because they guard against expensive mistakes: a training launch without checkpoints, and reading the credentials file.
The permission rule and the hook take a few lines of settings:
{
"permissions": {
"deny": ["Read(./.env)", "Read(./.env.*)"]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/require-checkpoint.sh" }
]
}
]
}
}
The hook receives the tool call as JSON on standard input; exit code 2 blocks the call and returns the message to Claude:
#!/bin/bash
# PreToolUse hook: refuse a training launch that would lose all progress if the job is cut off.
# Claude Code passes the tool call as JSON on stdin; exit 2 blocks it and shows stderr to Claude.
cmd=$(jq -r '.tool_input.command // empty')
if [[ "$cmd" == *"hf jobs"* && "$cmd" == *"train"* && "$cmd" != *"--checkpoint-every"* ]]; then
echo "Blocked: every HF Jobs training launch needs --checkpoint-every (see CLAUDE.md, Machine)." >&2
exit 2
fi
exit 0
Tested on three commands: a launch without the flag was blocked with exit code 2; the same launch with --checkpoint-every 500 passed; an unrelated pytest -q passed.
A path-scoped rule carries conventions that matter for one part of the tree. Its front matter decides when it loads:
---
paths:
- "src/**/*.py"
---
# Python in src/
- A correction (a base rate, a unit, a clip) lives in one function that every caller uses.
A fix inside one method will be bypassed by the next caller.
- Experiment settings come from the validated config in `config/`, not module constants.
- Run `uv run ruff check src` and `uv run pytest -q tests/unit` before saying a change works.
A procedure becomes a skill, loaded when the task calls for it or when you type /release:
---
name: release
description: Cut a fintfm release. Use when the user asks to release, tag or publish a version.
---
# Release
1. Confirm `main` is clean and CI is green for its last commit.
2. Bump the version in `pyproject.toml` only, and move the CHANGELOG `[Unreleased]` section under it.
3. Run the full gates: `uv run ruff check . && uv run pytest -q`.
4. Create the release with the CHANGELOG section as the notes, unwrapped, as a draft.
5. Publish the draft, then check that the Zenodo record appeared.
Stop and ask before step 5 if any gate failed.
None of this is in context while Claude fixes a typo in the README. That is the saving.
Treat it like code
The second study's phrase, files that "evolve like configuration code", suggests the remedy: manage them like code.
- Review changes. Put CLAUDE.md, rules and skills in pull requests like any other change, with an owner who reads them.
- Date each rule. A date makes pruning quick: when the cause is gone, the rule goes.
- Search before adding. Look for an existing rule on the same topic, so you change one line instead of adding a contradiction.
- Test what can be tested. Commands are the most common content and the first to rot when a tool is renamed. This script checks that every command under
## Commandsstill exists:
"""Check that every command listed under a "## Commands" heading in CLAUDE.md still exists.
Reads the backticked commands in that section and checks the first word of each is on PATH.
Run it in CI so the file fails loudly when a tool is renamed or removed.
Usage: python check_commands.py [path/to/CLAUDE.md]
"""
import re
import shutil
import sys
from pathlib import Path
def commands(text: str) -> list[str]:
"""Backticked commands in the "## Commands" section, which ends at the next "## " heading."""
section = re.search(r"^## Commands\n(.*?)(?=^## |\Z)", text, re.M | re.S)
spans = re.findall(r"`([^`]+)`", section.group(1)) if section else []
return [s for s in spans if not s.endswith("/")] # a folder such as `web/` is not a command
def missing(cmds: list[str]) -> list[str]:
return [c for c in cmds if shutil.which(c.split()[0]) is None]
if __name__ == "__main__":
found = commands(Path(sys.argv[1] if len(sys.argv) > 1 else "CLAUDE.md").read_text())
gone = missing(found)
for c in gone:
print(f"not on PATH: {c}")
print(f"{len(found)} commands, {len(gone)} missing")
sys.exit(1 if gone or not found else 0)
On the 22-line template it found nine commands, all present, and exited 0. With a stripped-down PATH it reported eight missing and exited 1, and on a file with no Commands section it also failed, so a CI job notices when the section disappears.
Recipes
Start from /init, then cut. Let Claude draft the file, then delete what it could have read from the code. Anthropic notes that the draft "captures obvious patterns but may miss nuances" of your project. Keep commands, boundaries and hidden facts, and add what the draft missed.
Turn repeated corrections into rules. The second time you correct the same mistake, ask Claude to propose a rule with the five parts above, and use the flow to decide where it goes. A one-off does not need a permanent line.
Split by language. In a repository with Python, Rust and TypeScript, put each language's conventions in .claude/rules/python.md, rust.md and typescript.md with matching paths:. The root file keeps only what is shared.
Keep preferences personal. Spelling, commit address, how you like questions asked: these go in ~/.claude/CLAUDE.md, not in the team's file. A few lines are enough:
# My preferences (every project)
- British spelling in prose; no em dashes.
- Commits use my personal address and carry no AI attribution lines.
- Before a long or expensive command, say what it will cost and how long it will take.
- When unsure which of two designs I want, ask once, with your recommendation first.
One source for several agents. If the team also uses other coding agents, keep shared instructions in AGENTS.md and make CLAUDE.md a short file that imports it with @AGENTS.md and adds what is specific to Claude Code.
In a monorepo, push rules down. A team repository I worked in kept a short root file and more than twenty small CLAUDE.md files in its packages and services, most a few dozen lines, plus skills for recurring procedures. Subdirectory files load only when Claude works there, so a frontend change did not pay for the worker's rules. It was the opposite of my two research projects, and every file stayed small.
Check what loaded. After a change, run /context all and look under Memory files.
The personal layer: auto memory
Some lessons belong to no single project: a pgrep -f loop that matches its own wrapper and never ends, a backgrounded job whose "exit code 0" is the wrapper's, not the job's. Claude Code keeps these in auto memory: "notes Claude writes itself based on your corrections and preferences", one file per memory with a MEMORY.md index, per project under ~/.claude/projects/.
Two limits make the index behave like a small CLAUDE.md. Only "the first 200 lines or 25KB of MEMORY.md, whichever comes first, load at session start", and auto memory "is machine-local": it does not reach another machine or a teammate. An index that grows by one line per lesson reaches the limit sooner than expected, and anything past it is silently not loaded. Prune it the same way: delete an entry when it stops being true.
Mistakes to avoid
| Mistake | What happens | Fix |
|---|---|---|
| One file for everything | Every rule costs context in every session; adherence drops | Root under 200 lines; move the rest to rules, skills, hooks |
| Emphasis instead of enforcement | IMPORTANT in capitals still works only most of the time | Make must-rules hooks or permissions |
| Contradictions between files | Claude "may pick one arbitrarily" | One owner per topic; search for duplicates when adding a rule |
| Stale rules | The file describes a codebase that no longer exists | Date each rule's incident; prune when the cause is gone |
| Generated and never edited | Overviews Claude could have read anyway, at a cost | Treat /init as a draft; keep only what the code hides |
| Secrets or private context | The file is part of the prompt and of the repository | Write it as if it were public |
One more: Anthropic advises, "Since CLAUDE.md becomes part of Claude's system prompt, treat it as documentation that could be shared publicly." FinTFM's history has a commit doing exactly that, some weeks after the repository went public: it removed references to private sibling projects and local machine details from CLAUDE.md.
A checklist
- Is the root file under 200 lines, and does
/context alllist everything you expect? - Does every line say something Claude could not learn from the code?
- Are the build, test, lint and type-check commands exact, and checked in CI?
- Is every rule that must always hold enforced by a hook, a permission rule or a tool?
- Do language- or folder-specific conventions live in path-scoped rules?
- Are procedures longer than a few lines skills?
- Does each rule name the symptom, the cause and a check, and carry a date?
- Did you search for a rule that contradicts the one you are adding?
- Would you be comfortable if the file were public?
Limits of this post
The research is young: mostly preprints, small samples, different measures, and none of it tests the advice here directly. My files come from eleven projects by one person. The categories in Figure 3 and the split in Figure 5 are my classification, the incident count comes from a pattern search, and token counts are estimates. The documentation quoted is a living document, read on 2 December 2026; check the current version before relying on a detail such as a size limit.
Sources and further reading
Anthropic documentation
- How Claude remembers your project: scopes, load order, imports, path-scoped rules, size guidance, AGENTS.md and auto memory.
- Best practices for Claude Code: what to include, and when a rule belongs in a hook.
- Automate actions with hooks, skills, subagents and settings and permissions.
- Using CLAUDE.md files (November 2025) and the Claude Code 101 lesson The CLAUDE.md file.
- Effective context engineering for AI agents (September 2025).
Research
- Chatlatanagulchai et al., On the Use of Agentic Coding Manifests: An Empirical Study of Claude Code (2025) and Agent READMEs: An Empirical Study of Context Files for Agentic Coding (2025).
- Gloaguen et al., Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents? (2026).
- Lulla et al., On the Impact of AGENTS.md Files on the Efficiency of AI Coding Agents (2026).
- Jaroslawicz et al., How Many Instructions Can LLMs Follow at Once? (2025).
- Liu et al., Lost in the Middle: How Language Models Use Long Contexts (2023).
Formats and practice
- AGENTS.md, the open format, and Agent Skills, the open standard that Claude Code skills follow.
- HumanLayer, Writing a good CLAUDE.md (November 2025): a practitioner's account, and the source of the "150 to 200 instructions" figure.
- FinTFM's CLAUDE.md, one of the two large files discussed here, in a public repository.