Skip navigation
Andrej Karpathy's coding rules turned into a single CLAUDE.md file just passed 232,000+ stars on…
0:00 / 0:30

Andrej Karpathy's coding rules turned into a single CLAUDE.md file just passed 232,000+ stars on…

beamnxw ./

@beamnxw18K followers

Visit on X
236 likesDownloadOriginal post

25,541 views

Andrej Karpathy's coding rules turned into a single CLAUDE.md file just passed 232,000+ stars on GitHub: Claude Code → Cursor → Codex → any AGENTS.md setup the shift: instead of writing longer prompts, you lock your agent into 4 strict behavioral loops before it touches a single file here's the full Karpathy skill from 0% to 100%: step 1 → Think Before Coding - stop guessing silently, surface tradeoffs, ask before writing code step 2 → Simplicity First - zero speculative abstractions, cut 200 lines of bloat down to 50 step 3 → Surgical Changes - touch only lines traced to the prompt, 0 drive-by edits to comments or style step 4 → Goal-Driven Loop - turn every task into "failing test → fix → loop until 100% green" most people still babysit their coding agent line by line - the real upgrade is one file that forces it to ask first, cut 1,000 lines down to 100, and verify its own PRs drop it into your repo today, not tomorrow - 1-command install & GitHub repo below: save this, then read the article below

15 Comments

Comments from the original post on X (Twitter)

  • beamnxw ./'s profile picture

    @beamnxw

    repo + 10-second setup (or just send this to your agent): Claude Code plugin: /plugin marketplace add multica-ai/andrej-karpathy-skills /plugin install andrej-karpathy-skills@karpathy-skills or drop raw CLAUDE.md into any project: curl -O GitHub:

    10 likes

  • NO1ennn's profile picture

    @N01ennn

    Interesting one

    1 like

  • Aven's profile picture

    @avenmode

    saved

    1 like

  • kiosa's profile picture

    @thegreatest_sv

    Worth reading

    1 like

  • Nilesh | AI tools & workflows's profile picture

    @Nilesharma0108

    The surgical changes rule is the one I'd keep above all. Most agent diffs get painful to review because of drive-by edits. Pairing it with failing-test-first gives you a clear definition of done, which matters more than a longer prompt.

    1 like

  • Cameron Peterson's profile picture

    @thecampeterson

    Pairs well w/ the new /code-review, it flags anything that breaks your CLAUDE.md rules now.

    1 like

  • monokern's profile picture

    @monokern

    saved this

    1 like

  • Bonsai 🌳's profile picture

    @bonsaixbt

    Whenever I see Andrej Karpathy, I hit like

    1 like

  • Josh The Monkey's profile picture

    @joshzemon

    this is fckng gold 🔥🔥🔥

    1 like

  • Elessar's profile picture

    @elessarqq

    Ty for sharing

    1 like

  • Khairallah AL-Awady's profile picture

    @eng_khairallah1

    i need this a lot my man

  • Omar Donnadieu's profile picture

    @OverviewEffect6

    Surgical changes saves me the most review time. Small diffs get read, big ones get skimmed. I put that rule in the agent guide, and Forge Desktop (a Mac app I built) gives every card its own branch and PR, so any drive-by edit is easy to spot and send back.

  • Chris's profile picture

    @Zeez0321

    do people run it as is or merge it into their own AGENTS.md? 4 loops on top of 200 lines of repo rules seems like a lot

  • marfin's profile picture

    @marfinxx

    this is super helpful, bro thanks for sharing

  • Virtuals Radar's profile picture

    @virtuals_radar

    Karpathy's AGENTS.md setup is the same pattern Virtuals agents already run under ACP: a system prompt that gates every action through a reasoning step before execution.