How to Write CLAUDE.md Instructions That AI Actually Follows
A developer who built 10 personal apps in three months documented which types of CLAUDE.md instructions reliably influence AI behavior and which do not. Vague directives like 'write clean code' or 'handle errors appropriately' proved ineffective because they cannot be objectively verified, while specific, checkable rules such as 'do not use #000000' worked consistently. Instructions that convey project-specific context — like why a technology was chosen or what alternatives were rejected — added real value, since the model already knows general best practices. Prohibitions framed as 'do not do X' outperformed positive directives, and pre-written exception lists prevented inconsistent judgment calls over time. The author also found that keeping the file concise, around 7KB, improved adherence, as a 74KB version saw the latter sections increasingly ignored.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in