返回提示词库
文本 · 通用大模型Karpathy 风格代码审查规则生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

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

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

17浏览
完整提示词可替换花括号中的变量后直接使用

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.

2026/4/9

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。