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:20260508.0cab7e8, 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_gizhg2v45ebbkek3
GET https://markdownregistry.com/api/v1/resolve?ref=mxyhi/ok-skills/karpathy-guidelines
GET https://markdownregistry.com/api/v1/blob/6e22cc54cb02a5e98ae42d06d9d7292db0c1b43894831b32879beb0166b2aea7
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.
mxyhi/ok-skills · agent-browser/SKILL.md · Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages…
mxyhi/ok-skills · better-icons/SKILL.md · Use when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving…
mxyhi/ok-skills · bopomofo-rescue/SKILL.md · Detect and recover text that was accidentally typed with the Taiwanese Bopomofo / Zhuyin (注音) keyboard while the input…
mxyhi/ok-skills · browser-trace/SKILL.md · Capture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then…
mxyhi/ok-skills · codebase-design/SKILL.md · Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find…
mxyhi/ok-skills · deep-research/SKILL.md · Professional deep research report generation — multi-agent collaboration with parallel chapter writing, automatic…
mxyhi/ok-skills · diagnosing-bugs/SKILL.md · Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports…
mxyhi/ok-skills · domain-modeling/SKILL.md · Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md…
coco-research/coco · skills/karpathy-guidelines/SKILL.md · Pointer to the upstream skill for behavioural guidelines that reduce common LLM coding mistakes, installed from…
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…
jjmartres/ai-coding-agents · shared/.ai-agents/skills/karpathy-guidelines/SKILL.md · Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…