프롬프트 도감 › No.041
카파시 4원칙: AI 코딩 실수 줄이기
Karpathy Guidelines
안드레이 카파시가 X에 올린 'AI 코딩 도우미의 4가지 실패'를 커뮤니티가 CLAUDE.md로 정리한 거예요. 프로젝트 맨 위 폴더에 두면 Claude Code가 매번 읽어요. 오류가 41%에서 11%로 줄었다는 비교 글도 있어요.
이럴 때 CLAUDE.md, AGENTS.md
도구 Claude Code · Codex · Cursor
프롬프트
# Coding guidelines ## 1. Think before coding - Don't assume. Don't hide confusion. Surface tradeoffs. - State your assumptions explicitly. If uncertain, ask. - If multiple interpretations exist, present them; don't pick silently. - If a simpler approach exists, say so. Push back when warranted. ## 2. Simplicity first - Write the minimum code that solves the problem. Nothing speculative. - No features beyond what was asked. No abstractions for single-use code. - No error handling for cases that can't happen. - If you wrote 200 lines and it could be 50, rewrite it. ## 3. Surgical changes - Touch only what you must. Don't "improve" adjacent code, comments or formatting. - Don't refactor things that aren't broken. - Match existing style. Remove only what your change made unused. - Every changed line should trace to the request. ## 4. Goal-driven execution - Convert vague instructions into verifiable success criteria before you start. - For multi-step tasks, emit a lightweight plan first. - Verify: run the tests, show the output. Don't say "done" without evidence.
팁
- CLAUDE.md, AGENTS.md, .cursorrules 어디에 넣어도 똑같이 동작해요.
- 'Surgical changes'(필요한 곳만 정확히 고치기)가 가장 체감이 커요.
출처
권리: MIT (andrej-karpathy-skills).