Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Karpathy Guidelines
Behavioral guidelines to reduce common LLM coding mistakes, derived from [Andrej Karpathy's observations](https://x.com/karpathy/status/2015883857489522876) on LLM coding pitfalls.
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
## 1. Think Before Coding
**Don't assume. Don't hide confusion. Surface tradeoffs.**
Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
## 2. Simplicity First
**Minimum code that solves the problem. Nothing speculative.**
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
## 3. Surgical Changes
**Touch only what you must. Clean up only your own mess.**
When editing existing code:
…
The line at the top of this page pins the label git:20260428.dfccef3, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_ne6hma5k6iyzs7zq
GET https://markdownregistry.com/api/v1/resolve?ref=jjmartres/ai-coding-agents/karpathy-guidelines
GET https://markdownregistry.com/api/v1/blob/20592a9d25b54dcf54f3f2992155eaf4d57fa09dca132b1003947f4fdb5aabf4
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
jjmartres/ai-coding-agents · shared/.ai-agents/skills/asd-ste100/SKILL.md · Use when English text must be parsed without a human to resolve ambiguity — tool descriptions, error messages…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/asdf/SKILL.md · Use this skill whenever the user wants to install, configure, or use asdf (asdf-vm), the universal version manager…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/astro-dso-doc/SKILL.md · Bootstraps a deep-sky object (DSO) astrophotography project from raw acquisition frames (own rig, not a smart…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/datadog/SKILL.md · Use this skill when you need to search Datadog logs, query metrics, tail logs in real-time, trace distributed requests…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/document-code/SKILL.md · Apply Google Style documentation standards to Python, Go, TypeScript, and Terraform code. Use when writing or reviewing…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/file-organizer/SKILL.md · Intelligently organizes your files and folders across your computer by understanding context, finding duplicates…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/google-skills/SKILL.md · Finds and loads the right official Google Cloud skill (GKE, Vertex AI, BigQuery, Cloud Run, Cloud SQL, Cloud Build…
coco-research/coco · skills/karpathy-guidelines/SKILL.md · Pointer to the upstream skill for behavioural guidelines that reduce common LLM coding mistakes, installed from…
mxyhi/ok-skills · karpathy-guidelines/SKILL.md · Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
openyida/openyida · .agents/skills/karpathy-guidelines/SKILL.md · Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
youdotcom-oss/agent-skills · .agents/skills/karpathy-guidelines/SKILL.md · Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
rudycity/superagent · .agents/skills/karpathy-guidelines/SKILL.md · Behavioral rules to minimize common LLM coding pitfalls. Applies to all code creation, modification, review, and…