Copybook中文Search

Rules

Karpathy’s 4 coding principles for CLAUDE.md

The agent over-designs and edits what it wasn’t asked to: think before coding, simplicity first, surgical edits, goal-driven work.

6.7K saves on X, as of Posted

CLAUDE.md principles
- think before coding: ask when unsure, don't silently pick one interpretation and run with it
- simplicity first: minimum code, any overengineering shows at a glance
- surgical edits: only touch what's required, don't fix up neighboring code on the way by
- goal-driven: translate fuzzy instructions into verifiable targets before starting

Next Paste them into your CLAUDE.md.

The #1 repo on GitHub trending that week was a CLAUDE.md file, with 44,465 new stars in a week: a skill distilling Andrej Karpathy’s LLM coding pitfalls into four principles.

Swapped into my CLAUDE.md, a few tasks in, it feels tighter.

Part of a playbook

Repo rules for agentsAgents guess, overbuild and widen scope: rules for AGENTS.md and CLAUDE.md.Open