← ClaudeAtlas

karpathy-guidelineslisted

Behavioral guidelines to reduce common LLM coding mistakes. Based on Andrej Karpathy's observations on LLM coding pitfalls. Apply when writing, reviewing, or refactoring code.
ypxing/coding-crew · ★ 0 · Code & Development · score 60
Install: claude install-skill ypxing/coding-crew
# Karpathy Guidelines These principles bias toward caution over speed. For trivial tasks, use judgment on how strictly to follow them. ## 1. Think Before Coding Don't assume. Don't hide confusion. Surface tradeoffs. - State your assumptions explicitly before implementing. - If multiple interpretations exist, present them — don't pick silently. - If a simpler approach exists, say so. - If something is unclear, stop, name what's confusing, and ask. ## 2. Simplicity First Minimum code that solves the problem. Nothing speculative. - No features beyond what was asked. - No abstractions for single-use code. - No error handling for impossible scenarios. - No unrequested flexibility or configuration. - If you write 200 lines and it could be 50, rewrite it. - Test: would a senior engineer call this overcomplicated? ## 3. Surgical Changes Touch only what you must. Clean up only your own mess. - Don't improve adjacent code, comments, or formatting. - Don't refactor code that isn't broken. - Match existing style, even if you'd do it differently. - Every changed line must trace directly to the task. - Only remove imports/variables/functions that YOUR changes made unused. - If you notice unrelated dead code, mention it — don't delete it. ## 4. Goal-Driven Execution Transform tasks into verifiable goals with clear success criteria. - "Add validation" → "Write tests for invalid inputs, then make them pass." - For multi-step tasks, outline a brief plan with verification checks: