Skills

Karpathy guidelines: one CLAUDE.md so Claude Code stays cautious before it edits

For people who want fewer common Claude Code coding traps. The guidelines favor caution over speed, so a simple typo or one-line edit does not need the full process.

Official source · andrej-karpathy-skills

Install

/plugin marketplace add forrestchang/andrej-karpathy-skills
/plugin install andrej-karpathy-skills@karpathy-skills

Who it is for

If you mostly edit repositories in Claude Code and want it to hit fewer of the usual LLM coding traps, this material is a better fit. It is a CLAUDE.md file meant to improve Claude Code's behavior, based on Andrej Karpathy's observations of LLM coding pitfalls:

https://x.com/karpathy/status/2015883857489522876

The page says the four principles live in one file and map directly to these problems. The available page text does not give the names or wording of those four principles, so do not invent names for them and do not make up a set of slogans. You need people who already use Claude Code and accept installing a plugin. If you only want to read the post and do not plan to change your local Claude Code setup, the link above is enough.

First try in 3 minutes

The official recommended install is two steps in a row; skipping either one means it is not fully installed. First run this in Claude Code:

/plugin marketplace add forrestchang/andrej-karpathy-skills

Then install the plugin immediately:

/plugin install andrej-karpathy-skills@karpathy-skills

This changes Claude Code plugin settings; it is not a read-only look. Before you run it, confirm you are in the Claude Code environment you actually want to write to, and finish both steps. Do not add the marketplace and skip install.

After it is installed, do a check first; do not immediately make large repo changes. Pick a non-trivial change, ask Claude Code to explain how it plans to edit and which files it will touch, then allow it to write code only after you agree. The success signal is that it shows "caution over speed": it explains first, then acts, instead of dropping a large patch right away. If it starts refactoring unrelated modules, stop it.

Usage examples

Example 1: Handle a non-trivial coding task. The guide exists to improve how Claude Code behaves around LLM coding traps. Limit the task to "read CLAUDE.md first, then edit". The available page text does not give titles for those four principles, so you cannot ask it to follow a name you invented; what you can ask is: read this one file, then give the change scope. Check two things: it read this guide, and it gave the scope before it edited files.

Example 2: Decide whether to run the full rigorous process. The page says these guidelines favor caution over speed; for trivial work (simple typos, an obvious one-line fix) you decide yourself, and you do not run the full set every time. When you are only fixing an obvious typo, tell it clearly that this is a trivial change and not to expand the process. It does not define an automatic rule for "obvious", and it does not say which file types are exceptions. So the boundary is yours to judge on the spot; if the agent turns a typo fix into a refactor, it has already left this example.

Limits

This is a CLAUDE.md for Claude Code, not a general editor rules pack. The page does not describe how to rename it for other products. The four principles live in one file, but the available page text only goes as far as "there are four, and they map to these problems"; there is no inventory of the principles. Do not add names, and do not pretend you already quoted the original sentences from the file.

The recommended install is the marketplace add then plugin install above. Do both steps. Do not put another installer beside them. The source observations are in Karpathy's post; the guide itself is a derived use and does not replace that post's context.

The first stop is "explain first, then edit". Any refactor beyond the current task, bulk reshuffling, or new abstraction must first name the files it will change and why, and you confirm before it continues. For trivial edits, downgrade the process yourself so a spelling fix does not run the full set.