multica-ai/andrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository Của Tháng
#1 Repository Của Tháng
#2 Repository Của Tuần
🧠 Karpathy's Four Rules for Smarter AI Coding
One file. Four principles. Zero fluff.
This repository provides a single CLAUDE.md file distilled from Andrej Karpathy's widely shared observations on how LLMs fail during coding tasks. It ships as a Claude Code plugin, a per-project CLAUDE.md, and a Cursor rule — so the same guardrails follow you across editors and projects.
✨ Highlights
- Think Before Coding: State assumptions explicitly, surface tradeoffs, push back when a simpler path exists, and stop to ask when confused rather than silently picking an interpretation.
- Simplicity First: No features beyond what was asked, no single-use abstractions, no speculative configurability. If 200 lines could be 50, rewrite it.
- Surgical Changes: Touch only what the task requires. Don't refactor adjacent code, reformat, or delete pre-existing dead code — only clean up imports and orphans your own changes created.
- Goal-Driven Execution: Transform "fix the bug" into "write a test that reproduces it, then make it pass." State brief plans with explicit verification steps for multi-step work.
- Three installation paths: Claude Code plugin (recommended), curl a
CLAUDE.mdinto any project, or use the committed.cursor/rules/karpathy-guidelines.mdcfile for Cursor. - Built-in self-check: The guidelines are working when you see fewer unnecessary diff changes, fewer overcomplicated rewrites, clarifying questions arriving before implementation, and clean minimal PRs.
- Designed for merging: Add project-specific rules below the four principles — e.g., TypeScript strict mode, endpoint test requirements, existing error-handling patterns.
💡 Why it matters
LLMs routinely make wrong assumptions and run with them, overcomplicate APIs with bloated abstractions, and edit code they don't fully understand as a side effect. This file directly counters those failure modes with four enforceable principles rather than vague prompts.
The real insight is Goal-Driven Execution: instead of telling the agent what to do, you give it success criteria and let it loop until verified. That shift — from imperative commands to declarative goals with tests — is what makes the guidelines practical rather than decorative.
Tradeoff: these rules bias toward caution over speed. They are overkill for trivial one-liners, but invaluable on any non-trivial feature or refactor where you want fewer rewrites and cleaner diffs.
#LLM #ClaudeCode #Karpathy #OpenSource #TiniX