Development · GitHub repo
andrej-karpathy-skills
A CLAUDE.md template fixing common LLM coding pitfalls using four principles.
This repository provides a single CLAUDE.md configuration file designed to eliminate frequent AI coding failure modes, including silent assumptions, code overcomplication, and unintended edits to neighboring files. Based on observations shared by Andrej Karpathy, the guidelines enforce explicit clarification, minimal code, surgical edits, and test-driven success criteria. It drops directly into any Claude Code or Cursor project with zero setup.
What it's for
- Prevent Claude Code or Cursor from making unwarranted changes to untouched code
- Stop AI coding assistants from silently guessing when given ambiguous specifications
- Force AI models to write simpler, test-verified code rather than bloated abstractions
- Standardize AI code generation practices across a developer team
Features
- Four core principles: Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution
- Enforces explicit questions and tradeoff analysis before implementation begins
- Prohibits speculative abstractions, unused flexibility, and drive-by refactoring
- Encourages test-first development loops with concrete verification steps
- Includes ready-to-use Cursor project rule configuration (.cursor/rules)
- Available as a single file download or installable Claude Code plugin
Pricing
Open source
Details
- Type
- GitHub repo
- Category
- Development
- Topic
- AI Coding Prompts
- Open source
- Yes
- Platforms
- Command line, other
- For
- Software developers using Claude Code, Cursor, or LLM coding assistants
- Tags
- claude code, cursor, llm guidelines, coding assistant, karpathy, prompt engineering
Why it was saved
- @dr_cintas: Encodes 4 behavioral constraints to fix common LLM coding bad habits: silently making wrong assumptions, overcomplicating code, editing code that wasn't asked to change, and running without pushback or clarifying questions.
- @dunik_7: The floor template referenced by the article; the full file reportedly at the end of the article.
Related
Portable agent skills that enforce design quality in AI-generated frontends
AI agent skills for UI animation, design engineering, and interface polish
Claude Code skill to ground the agent in the current branch diff
Gallery of community prompts for generating Remotion videos with coding agents
Cursor rules to keep Claude 3.7 Sonnet focused and non-destructive
Curated design-engineering skills and constraints for coding agents
Updated