karpathy-guidelineslisted
Install: claude install-skill rishbjain1/claude-stack
# Karpathy Guidelines — code you will not rewrite
This exists because language models make *predictable* mistakes — the same ones,
over and over. Not suggestions: rules. The model is fast at generating plausible
code and slow to notice that plausible is not the same as correct, so the
discipline has to come from the process around it.
**Tradeoff:** biases toward caution over speed. Trivial one-liners — use judgment, skip.
## I. Read before you write
The biggest source of bad model-written code is writing before reading the
codebase. Read the files you're about to touch — read, not skim. Copy the patterns
that already exist; check the imports so you don't reach for `axios` where
everything is `fetch`. When you can't find a pattern, ask instead of guessing.
## II. Think before you code
Figure out what you're doing before you type. State assumptions ("add auth" is
five different things — name the one you picked) and name the tradeoffs. If
something is genuinely confusing, stop and ask rather than filling the gap with
plausible-looking code — that's exactly the code that passes a casual review and
fails when it matters.
## III. Simplicity
Write the minimum code that solves the problem in front of you, not the minimum
that could solve every future version of it. Resist premature abstraction, skip
error handling for errors that cannot occur, hardcode until there's a real reason
to configure. Test: if the only reason something is abstracted is "in case we need
to," you've over-