# andrej-karpathy-skills

> A CLAUDE.md file that tells Claude Code to ask first, keep code small, edit narrowly

- Repository: https://github.com/multica-ai/andrej-karpathy-skills
- Category: Agent skills & plugins
- Stars: 222,565 · Forks: 22,317 · Language: n/a · License: not stated
- Experience: Beginner friendly
- Page: https://ir.adyog.com/repos/multica-ai/andrej-karpathy-skills/

AI coding assistants often guess at what you meant and keep going. They also write far more code than the job needs, and sometimes change or delete code they don't understand. Andrej Karpathy described these habits in a post, and this repo turns his complaints into instructions for Claude Code.

The project is mostly one text file. Claude Code reads CLAUDE.md at the start of a session and treats it as standing instructions. The file holds four principles: think before coding, simplicity first, surgical changes, and goal-driven execution. The last one means turning a vague task into something checkable, such as writing a failing test and then making it pass.

The alternative is writing your own CLAUDE.md from scratch. This gives you a ready-made starting point that you can merge with project-specific rules. The README says the rules lean toward caution over speed, so for trivial edits you should use your own judgment. It also includes a Cursor rule file for the same guidelines.

## What it does

- **Think Before Coding**: Tells the model to state its assumptions, offer more than one interpretation when a request is ambiguous, and stop to ask when confused.
- **Simplicity First**: Asks for the minimum code that solves the problem. No unrequested features, no abstractions for single-use code, no speculative configurability.
- **Surgical Changes**: Limits edits to what the request needs and matches existing style. It mentions unrelated dead code instead of deleting it, and cleans up only what the model's own changes orphaned.
- **Goal-Driven Execution**: Rewrites tasks as verifiable goals, for example writing a test that reproduces a bug and then making it pass, and asks for a short plan with a check at each step.
- **Two ways to install**: Install it as a Claude Code plugin for all projects, or download or append the CLAUDE.md file to a single project. A Cursor rule file is included too.

## What you could build

- Add it to a new project's CLAUDE.md so Claude Code asks clarifying questions before it writes code.
- Append it to an existing CLAUDE.md to cut drive-by refactors and keep pull requests small.
- Install it as a plugin to apply the same habits across all your Claude Code projects.
- Use it as a template and add your own project rules, such as strict TypeScript or required tests for endpoints.
- Study it as an example of turning a known list of model failure modes into written instructions.

## Who it's for

Developers who already use Claude Code (or Cursor) and are tired of over-engineered or off-target edits; you only need to know what a CLAUDE.md file is.

## Get started

In Claude Code, add the marketplace and install the plugin to use it everywhere. Or download CLAUDE.md into a project folder, or append it to the one you already have.

```
/plugin marketplace add forrestchang/andrej-karpathy-skills
```
```
/plugin install andrej-karpathy-skills@karpathy-skills
```
```
curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md
```

Tags: claude-code, claude-md, prompting, coding-agents, karpathy
