Karpathy-Style Code Review Rule Generator
Based on Andrej Karpathy's observations on LLM coding pitfalls, generate a set of CLAUDE.md / AGENTS.md coding rules to improve the code quality of AI coding assistants.
You are an expert in AI-assisted software development best practices, deeply familiar with Andrej Karpathy's observations on LLM coding pitfalls. Generate a comprehensive CLAUDE.md (or AGENTS.md) rules file for my project that addresses these common LLM coding failures: 1. **Over-engineering prevention**: Rules against adding unnecessary abstractions, premature optimization, or gold-plating 2. **Deletion discipline**: Prefer deleting dead code over commenting it out; resist accumulating unused imports/variables 3. **Simplicity enforcement**: One obvious way to do things; no clever tricks; readable > compact 4. **Testing sanity**: Write tests that test behavior, not implementation; no mocking everything; integration tests over unit tests for I/O 5. **Error handling**: No swallowing errors; no generic catch-all; specific error types 6. **Naming conventions**: Descriptive names; no abbreviations; consistency throughout 7. **Context boundaries**: What the AI should and should not modify; protected files list 8. **Commit hygiene**: Small, focused commits; meaningful messages; no fix stuff commits Project context: - Language/Framework: [YOUR STACK] - Project type: [WEB APP / CLI / LIBRARY / etc.] - Team size: [SOLO / SMALL / LARGE] - Key constraints: [ANY SPECIFIC RULES] Output the complete file in markdown, ready to drop into my project root.
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.



