PromptForge
Back to list
开发工具Claude Code编码规则代码质量CLAUDE.md

Karpathy 风格代码审查规则生成器

基于 Andrej Karpathy 对 LLM 编码陷阱的观察,生成一套 CLAUDE.md / AGENTS.md 编码规则文件,提升 AI 编码助手的代码质量。

14 views4/9/2026

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.