
이번 글에서는 안드레 카파시(Andrej Karpathy)의 Claude 활용 원칙 및 팁이 담긴 CLAUDE.md 파일에 대해 살펴보겠습니다.
해당 CLAUDE.md 파일의 원본은 Github 링크에서 확인할 수 있습니다. 이 CLAUDE.md 파일은 카파시가 작성한 것은 아닙니다. 한 개발자가 카파시의 X 게시글을 보고 Claude 활용을 위한 핵심 원칙들을 뽑아 따로 Skill로 정리한 것입니다. 문서는 65줄로 매우 단순하지만, 스타를 14만 개 이상 받을 정도로 AI 생태계에서 관심도가 높습니다. 그럼 해당 CLAUDE.md 파일에 어떤 내용이 담겨있는지 확인해 보겠습니다.
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.
코딩 이전에 먼저 생각하도록 명시합니다. LLM이 가정한 내용이 있다면 명확하게 밝히고, 모호하거나 헷갈리는 부분이 있다면 질문하거나 의견을 제시하도록 합니다. 또한 보다 간단한 방법이 있다면 언급하고, 필요하다면 반박도 하도록 지시합니다. 이는 LLM이 모호하거나 임의적인 판단에 기반해 코딩을 시작하는 것을 방지하는 내용입니다.
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.
제목에서도 명확히 드러나듯이 단순하게 코드를 작성하도록 지시합니다. 이를 통해 LLM이 쓸데없이 복잡한 코드를 작성하거나 멋대로 추가 기능을 붙이는 것을 방지할 수 있습니다.
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.
해당 내용은 사용자의 요청 사항을 벗어나 LLM이 추가적인 개선이나 리팩토링을 임의로 수행하지 못하도록 막는 부분입니다. 구체적으로는 인접한 코드의 임의 수정, 잘 작동하는 코드의 리팩토링, 사용하지 않는 코드의 삭제 등을 방지합니다.
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.
마지막으로는 LLM에게 성공 기준을 명확히 정의해 주는 내용입니다. 단순히 버그 수정을 요청하기보다는, 버그를 재현하는 테스트를 작성하고 해당 테스트를 통과시키도록 요청하는 식으로 태스크를 검증 가능한 목표로 전환합니다.
5. 활용 방법
활용할 수 있는 방법은 두 가지로 나뉩니다.
먼저 Skills를 활용한 방법입니다. 우선 Claude Code 내에서 마켓플레이스를 추가합니다.
/plugin marketplace add forrestchang/andrej-karpathy-skills
다음으로 플러그인을 설치합니다.
/plugin install andrej-karpathy-skills@karpathy-skills
설치 이후에는 아래 명령어를 채팅 창에 입력해 명시적으로 skills를 로드해 주면 됩니다.
/karpathy-guidelines
다음은 CLAUDE.md 파일을 적용하는 것으로, 아래 명령어는 전역적으로 적용하는 방법입니다.
curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md
두 번째 명령어는 특정 프로젝트 단위로 적용하는 방법입니다.
echo "" >> CLAUDE.md
curl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md
해당 방법들은 기존 CLAUDE.md 파일에 덮어씌우는 것이므로 기존에 활용하던 CLAUDE.md가 있다면 백업이 필요합니다.
<참고>
1. https://github.com/multica-ai/andrej-karpathy-skills/blob/main/CLAUDE.md
2. https://x.com/karpathy/status/2015883857489522876
3. https://www.youtube.com/watch?v=gol5jv4wcfs
'AI > Claude' 카테고리의 다른 글
| [Claude] Claude Code /goal 명령어 활용 방법 (1) | 2026.06.08 |
|---|---|
| [Claude] Matt Pocock의 grill-me 스킬 활용 및 설치 방법 (0) | 2026.05.28 |
| [Claude] Claude Code Superpowers brainstorm 스킬 활용 및 설치 방법 (0) | 2026.05.07 |
| [Claude] Claude Code gstack /office-hours 스킬 활용 및 설치 방법 (1) | 2026.05.04 |
| [Claude] Git Worktree로 Claude Code 병렬 세션 돌리기 - 기본 설정부터 서브에이전트까지 (2) | 2026.04.23 |
댓글