andrej-karpathy-skills
by multica-ai
A single CLAUDE.md file of coding rules, based on Andrej Karpathy's notes, that makes Claude Code ask before assuming, keep code simple and change only what you asked.
- Stars
- 235,649 stars
- Forks
- 23k forks
- Last push
- 7 months ago
- Activity
- Slowing down
# Add the plugin marketplace in Claude Code$ /plugin marketplace add forrestchang/andrej-karpathy-skills# Install the guidelines plugin$ /plugin install andrej-karpathy-skills@karpathy-skills# Or add the CLAUDE.md to a new project$ curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.mdCommands from the project's README. Run them after installing (see below).
Overview
Understand andrej-karpathy-skills in 60 seconds
- What it does
- This repository is a single CLAUDE.md file of coding guidelines that makes Claude Code behave more carefully. It's based on Andrej Karpathy's observations about common mistakes language models make when writing code, and it works as a Claude Code plugin or a file you drop into your project.
- The problem it solves
- AI coding agents often assume things without asking, overcomplicate code, and change code they weren't asked to touch. Four short principles in this file push the agent to state assumptions, keep things simple, make only the requested changes, and work toward checkable goals.
- Why choose it
- Choose it for a tiny, readable set of rules you can merge with your own project instructions. The README notes it favours caution over speed, so use judgement on trivial tasks.
- Who should use it
- Claude Code users who want fewer unwanted changes
- Developers tired of overengineered AI-written code
- Teams standardising how coding agents behave
- Cursor users, through the included project rule
- Setup difficulty
You'll need:
- Claude Code (plugin or CLAUDE.md), or Cursor
- curl for the per-project install
How andrej-karpathy-skills works
The file contains four principles. Think Before Coding asks the agent to state assumptions, present interpretations and ask when unsure. Simplicity First asks for the minimum code that solves the problem with nothing speculative. Surgical Changes limits edits to what the request needs. Goal-Driven Execution turns tasks into verifiable goals, such as writing a failing test first and then making it pass.
You can install it as a Claude Code plugin from its marketplace, which makes it available across all your projects, or download the CLAUDE.md into a single project or append it to an existing one. The repository also includes a Cursor project rule so the same guidelines apply in Cursor.
The README lists signs it's working: fewer unnecessary changes in diffs, fewer rewrites caused by overcomplication, clarifying questions before implementation, and clean, minimal pull requests. It's designed to be combined with your own project-specific rules. The README states an MIT license.
Features
Key features
Think Before Coding
Surface assumptions and ask instead of guessing.
Simplicity First
Minimum code, no speculative features.
Surgical Changes
Touch only what the request needs.
Goal-Driven Execution
Turn tasks into verifiable success criteria.
Claude Code plugin
Install once for all projects.
Cursor rule
Same guidelines in Cursor.
Strengths
- One short file, easy to read and adapt
- Works per project or across all projects
- Merges with your existing CLAUDE.md
- MIT licensed
Limitations
- Guidelines, not enforcement: the model can still drift
- Biased toward caution, which can slow trivial tasks
- Mainly aimed at Claude Code
Practical use cases
Cleaner AI pull requests
Reduce drive-by refactors in diffs.
Team conventions
Share one set of agent rules across projects.
Test-first agent work
Have the agent loop until tests pass.
Installation
Install andrej-karpathy-skills
Commands come from Karpathy-Inspired Claude Code Guidelines's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Claude Code or Cursor
Supported systems
- Windows
- macOS
- Linux
- 1
Add the marketplace from within Claude Code
Text/plugin marketplace add forrestchang/andrej-karpathy-skills - 2
Install the plugin
Makes the guidelines available across all your projects.
Text/plugin install andrej-karpathy-skills@karpathy-skills
- 1
New project: download the file
Shellcurl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md - 2
Existing project: append to your CLAUDE.md
Shellecho "" >> CLAUDE.mdcurl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Add the guidelines to your current project
Shellcurl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md
andrej-karpathy-skills's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Add the guidelines to a project and combine them with your own rules
Make Claude Code follow the four principles alongside your project's conventions.
Before you start
- Claude Code installed
- A project folder
- 1
Append the guidelines to your CLAUDE.md
Shellecho "" >> CLAUDE.mdcurl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md - 2
Add your project-specific rules
For example a section listing your language settings, testing rules and error-handling patterns.
Text## Project-Specific Guidelines- Use TypeScript strict mode- All API endpoints must have tests- Follow the existing error handling patterns in `src/utils/errors.ts` - 3
Give the agent goals it can verify
Instead of "Fix the bug", ask it to write a test that reproduces the bug, then make it pass.
What to expect
Claude Code asks clarifying questions before implementing, keeps changes minimal, and produces smaller, cleaner diffs.
Next steps
- Install the plugin to use it in every project
- Try the Cursor rule in .cursor/rules
- Read Karpathy's original post linked in the README
Costs and requirements
What it costs to run
- License
- MIT, according to the README.Free
- Guidelines
- Free to use and adapt.Free
- Claude Code
- Uses your existing Claude Code plan.Depends
Troubleshooting
Common setup issues
Agent is slow on tiny fixes
The guidelines favour caution; for trivial tasks use judgement, as the README suggests.
Conflicts with your own instructions
Merge the file into your existing CLAUDE.md and add project-specific sections.
Using Cursor instead
See CURSOR.md for the included project rule.
Alternatives
Similar AI repositories
superpowers
obra
Collection of agent skills and a working method that guide AI coding agents through software development step by step.
tensorflow
tensorflow
Google's open-source machine learning framework for building and training neural networks.
markitdown
microsoft
Python tool from Microsoft that converts PDFs, Word, Excel, PowerPoint and other files into Markdown for use with AI.
transformers
huggingface
Hugging Face library for defining, running and training machine learning models for text, vision and audio.