10 things developers are telling Claude to never, ever do.
By Karen Spinner
Published: 2026-10-11
URL: https://wonderingaboutai.substack.com/p/i-analyzed-10000-claudemd-files-to
TL;DR: I worked with Claude Fable 5.1 to pull 10,000 Claude.md files stored with public projects on GitHub and analyze their contents. Many of these files included specific instructions intended to discourage Claude from bad habits, such as building beyond the project scope and guessing instead of asking questions. This article covers the top 10 most common instructions…and why these files may not always work.
Disclosure: I used Claude Fable 5.1 to build the study harness, send agents to gather 10,000 Claude.md files using GitHub’s API, and help me parse and analyze the collected text. I also asked Claude to build me a rough outline, and I used Opus 5.5 to help write the copy after I started drafting by hand and just ran out of time.
Subscribe for more independent AI research and evidence-based tech tips.
Coding agents have gotten a lot better over the past year, and now they’re so good that they can build complete projects with relatively minimal oversight. But, no matter how good coding agents get, they are still large language models, which means they will sometimes guess, make mistakes, and tell you what you want to hear.
I’ve been coding with Claude for about two years now, and, even now, I find it sometimes makes up syntax and even hallucinates whole APIs that don’t exist. This is why I’m continuing to brush up on my Python, and research projects pretty thoroughly before I hand them off to Claude.
I also give Claude some fairly specific dos and don’ts. And my own Claude.md file reflects this.
I’ve always assumed that other people do the same thing. And this past week I decided to pull 10,000 Claude.md files from publicly available GitHub repositories so I could know for sure, and find out if there were any important “rules” for Claude that I was missing.
How I ran the study
A Claude.md file is a set of instructions developers make for Claude Code. Because Claude reads it at the start of each session, it’s a great place to flag any mistakes you don’t want your model to repeat.
When I searched on October 5, 2026, about 843,000 of these files were stored on GitHub. I sampled 10,000 repositories containing these files and took one from each. To keep the sample from skewing towards very short or very long files, I drew from random result pages across 150 file-size bands, in proportion to the number of GitHub’s files for each band.
Claude Sonnet 5.5 then read the full text of each Claude.md file, with code samples removed, and tagged every rule that matched one of 26 LLM habits I’d documented beforehand. I also had Claude Opus double-check 200 of Sonnet’s evaluations.
A few words about terminology
Three terms come up throughout this article.
-
A conduct rule tells the agent how to behave, decide, or communicate. Project conventions, such as which package manager to use, were not counted.
-
A pointed rule calls out a misstep agents make that human contributors usually don’t. “Never say done without evidence” is a pointed rule.
-
A routine rule is a rule that could work well for either agents or people.
This study focuses on pointed rules, which are intended to discourage agents from known bad habits.
About half of these files contain no behavior rules
Of the 9,989 files, 4,781 (47.9%) had at least one conduct rule. The other half describe the project. That half includes 630 files too short to contain a rule and 750 that only send the reader to AGENTS.md, a similar instruction file that other coding agents read.
Earlier research is consistent with this pattern. A 2025 study of 2,303 agent context files reported that developers mostly write functional context, such as test procedures (75.9% of files), implementation details (70.8%) and architecture (68.1%) [1]. A smaller study of 253 Claude.md files also found content dominated by commands, implementation notes and architecture [2].
Pointed rules showed up in 3,302 files, or 33.1%. So about a third of the developers in this sample documented a specific complaint about how an agent behaves.
Among files with rules, the median file covers two habits. One file covered 15.
The top 10 bad habits
This ranking counts pointed rules only. Each share has a 95% confidence interval, which is the range the true figure probably falls in, given that I sampled 10,000 files out of about 843,000.
The intervals for the top three overlap, so I’m treating them as a tie. 
1. Guessing instead of asking (found in 803 files)
803 files have a pointed rule against this. These rules tell Claude to state its assumptions and wait for approval before it builds. Many also ask it to list every possible reading of a request.
Examples include:
-
“Do not invent. Do not guess. Do not redesign.”
-
“Surface assumptions before coding. If a request has multiple valid interpretations, list them explicitly.”
-
“surface any conflict instead of silently resolving it”
Another file says that replies like “yes” or “implement it” do not count as approval, and it tells Claude to present its task table and ask which items to approve.
2. Inventing APIs or facts (found in 768 files)
This is the habit I complained about in the intro. These rules tell Claude to check its sources and confess when it doesn’t know the answer. Examples include:
-
“NEVER fabricate information. If you can’t find it, mark it as “[NOT FOUND]” and note where you looked.”
-
“Don’t say “I think” if you’re unsure; say you don’t know.”
-
“Never invent a citation or attribute a number to a source you have not opened and read.”
Also ,one file explains that the repository has no test or lint scripts and tells Claude to stop making up commands for them.
3. Not checking its own work (found in 764 files)
These rules forbid saying a task is done or passing before Claude has run it and seen the result. Examples include:
-
“Never claim a test run happened without running it.”
-
“Migrations must be executed, not reviewed.”
-
“treat any visual or interaction change as needing a real-browser pass before calling it done.”
When routine rules are included, this is the most common rule in the whole study, appearing in 1,921 files (19.2%). Most of those are ordinary “run the tests before you commit” lines.
4. Doing more than asked (found in 649 files)
These rules forbid extra features and refactors that human developers do not specifically ask for. Some also ban abstractions, meaning reusable layers of code, for something that is used once. Examples include:
-
“Do not “improve” a neighbouring module on the way past.”
-
“Do not invent scope. If it is not in PRD.md, ask first.”
-
“If you find yourself writing a function body, stop. That belongs in the next session.”
-
“Coding agents over-build. These are explicit non-goals.”
A PRD is a product requirements document, the written description of what the project should do.
5. Patching symptoms instead of causes (found in 325 files)
These rules forbid suppressing errors, loosening checks, or adding fallbacks when Claude should be looking for the root cause of a problem. Examples include:
-
“When a first fix attempt fails, step back and investigate the root cause before trying another surface-level fix. Explain the diagnosis before proposing the next approach.”
-
“NEVER add eslint-disable, @ts-ignore, @ts-expect-error, or similar comments without explicit user instruction”
-
“When a git command is blocked, present the changes instead of working around the block.”
The comments named in the second quote tell a code checker to skip a line. The error message goes away and the bug stays.
6. Drifting from instructions (found in 291 files)
These rules tell Claude to reread its instructions and notes when a session starts, and to stop when a step fails. Examples include:
-
“If a command fails, report the error and wait for instructions. Do not retry the same command automatically.” (Alexander-Zangl/retina-track)
-
“Do not restart from scratch and do not silently overwrite prior content.” (sermakarevich/claude)
7. Ignoring the existing code (found in 273 files)
These rules tell Claude to read what exists and reuse it before it writes anything new. Examples include:
-
“Before writing any UI, read that directory and use what exists.” (RubertG/Bonita-maquillaje)
-
“Investigate before fixing “bugs”: What looks like a bug may be intentional; understand full context before changing” (smarty/smarty-address)
Another 822 files have only routine rules on this topic. Reading the code first is good advice for any new contributor.
8. Gaming the tests (found in 270 files)
These rules forbid weakening or deleting a test to get a pass. Examples include:
-
“Never weaken, skip, disable or delete a test to make a change pass.”
-
“A skipped or environment-gated test is never a pass.”
-
“never bend the code to a test you doubt without saying it.”
Another file’s rule covers snapshots, which are saved copies of a program’s expected output. It allows Claude to regenerate them only for intentional changes, and never to turn a failing test green.
9. Committing or pushing uninvited (found in 239 files)
These rules reserve git commits and pushes for the human unless the human asks. Several add merges to the list. Examples include:
-
“The AI agent must never merge its own pull request.” (QuTech-Delft/QMI)
-
“Commit on the current branch; never push. The owner pushes after reading the log.” (xkazm04/pumper)
-
“Don’t make git writes without explicit instruction. Read-only git is fine; add/commit/push/tag/reset need an in-turn ask.” (amedeos/image-cgroupsv2-inspector)
10. Running commands it should not (found in 238 files)
These rules keep Claude away from dev servers, full test runs, deploys and anything that touches a real account. Examples include:
-
“Never start or stop dev servers, let the user do it.”
-
“DO NOT run scripts/test-live.mjs repeatedly (burns daily upstream session creation limit)”
-
“Never test using the CLI directly - it affects the user’s real account.”
One developer included a rule stating they run all the tests themselves and Claude does not run tests, ever.
What missed the top 10
Working wastefully (232 files, 2.3%) and touching off-limits files (218 files, 2.2%) were closest, at 11th and 12th.
The wasteful category covers things like rereading files and overusing subagents. (A subagent is a second copy of the model that the main agent hands a task to.) One example includes:
-
“Don’t delegate what takes a handful of tool calls, or use subagents to double-check yourself.” (cwhoaon/claude-dotfiles)
Four more habits each appear in 1 to 2 percent of files.
-
Flattery and automatic agreement (204 files, 2.0%). “Don’t always be so agreeable with me; I need you to be critical and get to the right solution more than make me feel like I’m always right”
-
Long-winded output (180 files, 1.8%). “Do not narrate (”now I will inspect the project”). Do the work.” (jnnseya-cpu/TicketRoyality)
-
Faking the work (156 files, 1.6%). “Every number in results/ must be produced by a script, not hand-typed.”
-
Emojis and AI-flavored writing (112 files, 1.1%). “Outward-facing copy has zero AI slop: no em dashes, no breathless hype.”
Across the sample, 65 files have a rule against em dashes, and 70 have one against emojis.
Signing its work ranked 13th. 311 files (3.1%) tell Claude to leave AI attribution out of commits, pull requests or docs, and 204 of them have a pointed rule. By default, Claude Code adds a co-author line to commits and an attribution line to pull requests [3].
FYI, Claude Code has an attribution setting that turns both lines off, so you don’t need a rule for it [3].
Routine rules change the ranking
When every rule counts, two housekeeping topics jump into the top 10. Keeping documentation current appears in 1,107 files (11.1%), and handling secrets such as passwords and API keys appears in 639 (6.4%).
Almost none of those rules are pointed. Only 8% of the documentation files and 5% of the secrets files have a rule that names an agent-specific misstep. A guide for human contributors would include the same lines.
Newer repos are more likely to include specific rules for agents
Newer repositories have more of them. 37.8% of repositories created in 2026 have a pointed rule, compared with 26.0% for 2025 and 21.1% for 2024 or earlier. The year is when the repository was created, which may be earlier than when the file was written.
My guess is that many newer projects were built with coding agents from the first day, so their owners have had more reasons to write rules. But the data can’t confirm that.
Popular repos have fewer rules
The most starred repositories have the fewest. Only 14.5% of repositories with 1,000 or more stars have a pointed rule, compared with 35.6% of those with no stars. There are only 76 repositories in that top group, so its figure is rough.
Two smaller patterns also showed up.
-
Individuals write slightly more pointed rules than organizations (33.9% of repositories compared with 28.9%).
-
Longer files contain more. 11.8% of files under 1 KB have a pointed rule, and 57.8% of files at 20 KB or more do.
Rules are consistent across languages
These rules are also international. 483 files, or 10% of files with rules, have a rule written in a non-Latin script such as Chinese, Japanese, Korean, Thai or Russian. Examples include:
-
One Thai file says, in Claude’s translation, “Do not guess and keep writing. A wrong guess in this domain makes real money come out wrong.”
-
A Japanese file forbids moving, deleting or renaming things “just in case” or “for now.”
Some rules may have been inspired by an incident
A few rules say what went wrong before and suggest that rules for Claude are often documented in the wake of a failure:
-
“Large sweeping searches over the file system has crashed many nodes.”
-
“The worst thing you can do is repeatedly declaring work items as finished when they are not.”
-
“Do not run anything destructive (volume deletes, rm -rf, down -v) without asking first, even if it looks obviously correct.”
Another file notes that its .env file, where a project keeps its passwords and keys, “was clobbered once before.” It tells Claude to back the file up and append to it.
Do Claude.md files actually work?
The answer is…maybe. While Claude reads its Claude.md file at the beginning of every session, it may pay less attention to the rules as its context fills. Very long Claude.md files may also dilute themselves. And anything in Claude.md is a suggestion rather than a directive, so Claude may sometimes ignore it.
One recent study suggests these context files don’t improve outcomes and tend to increase costs. In Evaluating AGENTS.md, Thibaud Gloaguen and colleagues found that context files did not improve task success rates for Claude Sonnet 4.5, and that they raised inference cost by roughly 20% on average [4]. Inference cost is what you pay to run the model.
However, the same paper suggested that context files are useful for specifying non-standard coding practices.
Overall, my sense is that lengthy rules files with detailed project descriptions may add expense without helping, while a short list of behavior rules may still change what the agent does.
Limitations and disclaimers
-
These files are written for Claude Code, so the list describes that tool as its users see it. AGENTS.md files are even more common on GitHub, at about 1,067,000, and I didn’t sample them.
-
I used Claude models to run this study, which means Claude was sorting complaints about Claude.
-
The sample comes from GitHub search results, which are not a random draw. The median repository has no stars.
-
Opus found about 15% more rules than Sonnet in the 200 files both reviewed, so the shares are probably a little low.
-
Deciding whether a rule is pointed or routine is a judgment. Opus and Sonnet made the same decision 80% of the time.
Rules you can steal
I started this project to find out whether my own Claude.md was missing anything. If I were writing a new file today, I’d start with the top four habits. Ask before guessing, check the real source, run it before saying it’s done, and stay inside the request.
And these are some of the most repeated lines in the sample, with the number of repositories that use each one word for word:
-
“No features beyond what was asked.” (32 repositories)
-
“If a simpler approach exists, say so. Push back when warranted.” (30)
-
“Don’t refactor things that aren’t broken.” (26)
-
“State your assumptions explicitly. If uncertain, ask.” (24)
-
“If multiple interpretations exist, present them - don’t pick silently.” (19)
Next, I’d like to test to what extent rules like these change what Claude does, since research suggests their value may be limited.
If you have a rule that works really well for you, I’d love to hear about it in the comments.
Sources
-
Agent READMEs: An Empirical Study of Context Files for Agentic Coding, Chatlatanagulchai et al., arXiv 2511.12884
-
On the Use of Agentic Coding Manifests: An Empirical Study of Claude Code, Chatlatanagulchai et al., arXiv 2509.14744
-
Claude Code settings reference, Anthropic
-
Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?, Gloaguen et al., arXiv 2602.11988
Wondering About AI is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
