Karpathy-Inspired Guidelines for Claude

Harry · 13 Sep 2026 · 13 views

Why These Guidelines

Andrej Karpathy published observations on common LLM coding pitfalls: models make assumptions without checking, overcomplicate solutions, and change code they do not understand. Four principles, based on those observations, keep sessions disciplined.

Think Before Coding

  • State assumptions explicitly instead of guessing.
  • Present multiple interpretations when a request is ambiguous.
  • Push back when a simpler approach exists.
  • Stop when confused and ask for clarification.

Simplicity First

Write the minimum code that solves the problem. No features beyond the request, no speculative abstractions, no flexibility nobody asked for. If 200 lines can honestly be 50, rewrite it.

Surgical Changes

Touch only what the task requires. Do not reformat adjacent code or refactor what is not broken. If you notice unrelated dead code, mention it - do not delete it.

Goal-Driven Execution

Turn imperative tasks into verifiable goals. Instead of "add validation", say "write tests for invalid inputs, then make them pass". Strong success criteria let the agent loop independently until verified.

Key Points

  • State assumptions and surface tradeoffs early.
  • Prefer the smallest solution that works.
  • Change only lines that trace to the request.
  • Define success criteria and verify before finishing.
Share this post:

Comments (0)

Please login or register to comment.