karpathy-guidelines
하는 일
이 가이드는 AI가 흔한 실수를 피해 더 나은 코드를 작성하도록 돕습니다. AI가 코딩 전에 먼저 생각하고, 코드를 단순하게 유지하며, 꼭 필요한 변경만 하고, 좋은 결과가 무엇인지 분명히 정의하도록 가르칩니다.
사용하는 경우
- ✓AI가 새 코드를 작성할 때.
- ✓AI가 기존 코드를 고치거나 개선해야 할 때.
- ✓AI가 불필요하게 복잡하게 만들지 않기를 원할 때.
스킬 링크
https://github.com/multica-ai/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
📦 이 스킬이 포함된 팩
AI에게 요청하는 예시
“AI, 숫자 목록의 평균을 계산하는 함수를 작성해 주세요. 다만 시작하기 전에 신중하게 생각하고, 꼭 필요한 것만 추가해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 단계를 따릅니다. 작성하기 전에 먼저 생각하고, 필요한 최소한에 집중하며, 필요한 부분만 바꾸고, 작업이 끝났는지 알 수 있는 기준을 정합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Karpathy Guidelines
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
1. Think Before Coding
Don't assume. Don't hide confusion. Surface tradeoffs.
Before implementing:
- 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.
- If something is unclear, stop. Name what's confusing. 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 "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
3. Surgical Changes
Touch only what you must. Clean up only your own mess.
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: Every changed line should trace directly to the user's request.
4. Goal-Driven Execution
Define success criteria. Loop until verified.
Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
자주 묻는 질문
AI는 왜 코딩 전에 생각해야 하나요?
실수를 피하고, 문제를 완전히 이해하며, 필요 이상으로 복잡한 해결책을 만들지 않기 위해서입니다.
'단순한 코드'는 무슨 뜻인가요?
추가 기능이나 불필요한 복잡함 없이, 문제를 해결하는 데 필요한 최소한의 코드를 작성한다는 뜻입니다.
AI는 코드가 좋은지 어떻게 아나요?
명확하고 검증 가능한 목표를 정해서 판단합니다. 예를 들어 '버그를 고쳐라' 대신 '버그를 보여 주는 테스트를 작성한 다음, 그 테스트가 통과하게 하라'는 목표를 세웁니다.
상세 정보
작성자의 원본 설명
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
인기도
- GitHub 스타
- 220k
- 순위
- #628
- 라이선스
- —
- 업데이트
- 2026. 4. 20.
댓글
- …