Skip to content

Instantly share code, notes, and snippets.

@itsbsiddharth
itsbsiddharth / CLAUDE.md
Created June 27, 2026 18:49
The supposedly leaked Andrej Karpathy CLAUDE.md going around on X. The original G-Drive link has copying disabled, so here is the raw, downloadable file.

CLAUDE.md

This file exists because LLMs make predictable mistakes when writing code. Not random mistakes. The same ones, over and over. I've watched it happen enough times to write them down.

These are not suggestions. These are rules. Follow them and you'll produce code that doesn't need to be rewritten. Ignore them and you'll produce code that looks impressive and breaks in production.

1. Read Before You Write

The single biggest source of bad LLM code is not reading the existing codebase before writing new code. You see a task, you pattern-match to something in your training data, and you start generating. This is almost always wrong.