Back to Skills

Andrej Karpathy Skills

by forrestchang

otherbeginner
Claude Code skillsAndrej Karpathy SkillsCLAUDE.md best practicesLLM coding principlesAI coding behaviorKarpathy AIagent skills

43,000 GitHub stars. Trending #1 on GitHub. For a single Markdown file.Andrej Karpathy Skills distills observations from the former Tesla AI director and OpenAI founding member into one CLAUDE.md file that changes how Claude Code writes software. The repo, created by developer Forrest Chang, codifies four principles that address the most common ways LLMs fail at coding tasks.The core insight, in Karpathy's words: "LLMs are exceptionally good at looping until they meet specific goals. Don't tell it what to do — give it success criteria and watch it go."The Four Principles1. Think Before Coding. LLMs make assumptions without checking. They see a function name and guess what it does instead of reading the implementation. This principle forces Claude to state assumptions explicitly, present multiple interpretations when instructions are ambiguous, push back when the request seems wrong, and name confusion before proceeding. The result: fewer "helpful" changes that break things.2. Simplicity First. Left unchecked, LLMs overengineer. They add abstraction layers, create utility functions nobody asked for, and build error handling for scenarios that will never occur. This principle enforces minimum code that solves the actual problem. No speculative features. No unnecessary abstractions. No premature optimization.3. Surgical Changes. LLMs see a file and start "improving" everything. Rename variables. Refactor functions. Add docstrings. None of it was requested. This principle restricts Claude to touching only what the task requires. Match existing code style. Do not improve adjacent code. Remove only code that your changes made unused.4. Goal-Driven Execution. Instead of telling Claude what to do step by step, convert tasks into verifiable success criteria. "Make the tests pass" is more effective than "fix the bug in line 47." Claude can loop, retry, and explore alternatives when it has a clear success condition. It cannot do that with imperative instructions.InstallationTwo methods. The plugin marketplace: /plugin marketplace add forrestchang/andrej-karpathy-skills then /plugin install andrej-karpathy-skills@karpathy-skills. Or the manual approach: download the CLAUDE.md file with curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md and place it in your project root.That is it. No dependencies. No configuration. No runtime. One file changes the behavior.Why 43,000 Stars for a Markdown FileBecause it works. The principles address the four most frustrating LLM coding behaviors: assumptions without verification, unnecessary complexity, unrelated changes, and vague execution. Anyone who has used Claude Code, Cursor, or Copilot has experienced all four. One file, four rules, measurably better output.The 43K stars also reflect a shift in how developers think about AI coding tools. The bottleneck is not model capability. Claude Code is already brilliant at writing code. The bottleneck is behavior — getting the model to write the right code for the right reasons. Karpathy's principles are behavioral constraints, not capability enhancements.LimitationsThe file is optimized for Claude Code specifically. Other agents (Cursor, Copilot, Codex) can read Markdown skill files, but the behavioral changes may be less effective because they have different system prompt structures. The principles are also opinionated — "Simplicity First" conflicts with teams that value defensive programming and extensive error handling. The file does not address multi-file refactoring, test generation, or architecture decisions.For more Claude Code skills, browse repos.skila.ai/skills. For AI coding tools, check tools.skila.ai. For articles on AI-powered development workflows, visit news.skila.ai.

Installation

curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md

Key Features

  • Think Before Coding: forces Claude to state assumptions explicitly and push back on ambiguous instructions
  • Simplicity First: enforces minimum code with no speculative features or unnecessary abstractions
  • Surgical Changes: restricts edits to only what the task requires, matching existing code style
  • Goal-Driven Execution: converts tasks into verifiable success criteria instead of step-by-step instructions
  • Zero dependencies: one Markdown file, no runtime, no framework, no configuration
  • Plugin marketplace support: install via /plugin marketplace add forrestchang/andrej-karpathy-skills

Use Cases

  • Reducing overengineered AI-generated code in Claude Code sessions
  • Preventing LLM assumptions and hallucinated changes in large codebases
  • Enforcing code review standards for AI-assisted development workflows
  • Training teams on effective prompt engineering for coding agents
  • Establishing behavioral guardrails for Claude Code in enterprise settings

Related Resources

Weekly AI Digest