Skip to content

Guide · Agent skill

How to use the Karpathy Coding Guidelines agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The andrej-karpathy skill is a set of behavioral guidelines for AI coding agents, based on Andrej Karpathy's observations about common LLM coding mistakes. It is aimed at developers who want an assistant to make small, focused code changes instead of overbuilt ones. After reading this guide you will know what the skill changes about the agent's behaviour, how to install it, how to trigger it with plain requests, and where it does not help. An agent skill is a folder containing a SKILL.md file of instructions that an AI assistant loads when it is relevant to the task. This skill has one file, SKILL.md, and it adds no new tools.

Karpathy Coding Guidelinessickn33/agentic-awesome-skills · MIT

Quick start

  1. 1Download the ZIP. Download the andrej-karpathy ZIP from this page and unzip it.
  2. 2Choose a location. Place the andrej-karpathy folder in ~/.claude/skills/ for personal use, or in a project's .claude/skills/ folder for one repository.
  3. 3Or upload in the Claude apps. In the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
  4. 4Make a clear request. Ask for a write, review, or refactor and state the goal and the constraint, such as which tests must keep passing.
  5. 5Check the agent's assumptions. Read the assumptions and plan the agent states before it edits code, and answer any questions it asks.
  6. 6Verify the result. Confirm the tests the agent wrote or ran pass, and that every changed line relates to your request.

What the skill makes the agent do

The skill sets four habits for writing, reviewing, and refactoring code. The agent is asked to think before coding, keep solutions simple, make surgical changes, and define success criteria before looping until they are verified.

In practice, the agent should state its assumptions and ask when something is unclear, rather than picking an interpretation silently. It should avoid features, abstractions, or configurability you did not request, and touch only lines that trace back to your request.

  • Think before coding: state assumptions, present multiple interpretations, and ask when unclear.
  • Simplicity first: no speculative features, no abstractions for single-use code, and rewrite if 200 lines could be 50.
  • Surgical changes: don't improve adjacent code or formatting, match existing style, and mention unrelated dead code rather than deleting it.
  • Goal-driven execution: turn tasks into checks, such as writing a test that reproduces a bug before fixing it.

Install the skill from the ZIP

Download the ZIP from this page and unzip it. Place the andrej-karpathy folder in one of two locations: your personal skills folder at ~/.claude/skills/, or a project's .claude/skills/ folder if you want the skill limited to one repository.

Alternatively, in the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload

Trigger the skill with natural requests

The skill's description says it applies when writing, reviewing, or refactoring code. You can make this explicit by mentioning the kind of work you want, such as a review for overcomplication or a refactor that must keep behaviour the same.

Good requests state the goal and the constraint. Vague requests give the agent less to verify against, which is the problem the skill is designed to address.

  • "Review this pull request for overcomplication and scope creep."
  • "Refactor this service, and keep its existing behaviour checked by the current tests."
  • "Fix the bug in the parser. Write a test that reproduces it first."
  • "Add validation to this form, and only touch the form component and its test file."

See an example of the expected behaviour

For a request to add validation, the skill's example shows the agent first stating an assumption, then planning a small validator with tests for invalid inputs, and limiting the scope to the form component and its test file.

For a refactor, the example has the agent first ask what behaviour must remain unchanged, identify a concrete smell such as duplicated parsing logic, make the smallest refactor, and run the existing service tests.

1. [Step] -> verify: [check] 2. [Step] -> verify: [check] 3. [Step] -> verify: [check]

What the skill needs and its safety notes

The skill lists no requirements. It does not run scripts and does not use the network. It is only instructions, so it does not automate anything by itself. The agent still does the work using whatever tools it already has.

The skill is licensed under MIT. It is a general guardrail set and does not replace your project's own architecture or style rules.

  • Requires: nothing listed
  • Runs scripts: no
  • Uses network: no
  • Licence: MIT

Tips for getting the most from it

Use the skill as a default for real changes, and relax it for trivial work. The skill itself says its guidelines bias toward caution over speed, so for small or throwaway tasks, use judgment.

For emergency fixes, the skill says to prioritise the smallest verified correction over extensive planning. For prototypes, some caution can be relaxed, but assumptions and verification should still be stated.

  • Pair it with your project's own rules, since it does not supply architecture or style guidance.
  • Give concrete success criteria, such as which tests must pass before and after a refactor.
  • Check that every changed line traces back to your request during review.

What people use it for

  • Reviewing AI-generated code for overcomplication or scope creep.
  • Adding a feature to an existing form or component with changes limited to specific files.
  • Fixing a bug by first writing a test that reproduces it.
  • Refactoring a service while keeping existing behaviour checked by its current tests.
  • Simplifying code that has grown more complicated than the task needs.

Frequently asked questions

How do I install the andrej-karpathy skill?

Download the ZIP from this page and unzip it. Put the andrej-karpathy folder in ~/.claude/skills/ for personal use, or in a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

Does the andrej-karpathy skill require anything else to run?

The skill lists no requirements. It does not run scripts and does not use the network. It consists of a single SKILL.md file of instructions and adds no new tools.

Is the Karpathy coding guidelines skill free?

The skill is released under the MIT licence, as listed on this page. Check the licence text in the source repository for the full terms.

Does the skill make the AI write code automatically?

No. It only gives the agent behavioural rules for writing, reviewing, and refactoring code. It does not automate anything by itself, and the agent still does the work with the tools it already has.

What should I use instead for quick prototypes?

The skill itself says to use judgment for trivial tasks, and that its caution can be relaxed for exploratory prototypes. For throwaway work you may not need it at all. If your project needs specific architecture or style rules, those must come from your own documentation, because the skill does not replace them.

Why isn't the agent following the guidelines?

Check that the folder is in the right location and contains SKILL.md, and that the skill is loaded in your tool. Then make your request more explicit about the task type, such as a review or refactor, so the description matches. Agents can still deviate, so review the plan and changes.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers and teams who want AI-assisted changes to be minimal, focused, and checked against tests, and anyone reviewing code for overcomplication. It is less useful for quick throwaway prototypes or trivial tasks, where its caution adds friction. If your project depends on specific architecture or style rules, you will still need to supply those yourself.

Download the skill