콘텐츠로 건너뛰기
H-A

Hangbok Archive

  • Wiki
  • NEWS
  • Wiki
  • NEWS

AI 코딩 에이전트 Wiki

  • AI 코딩 에이전트
  • AI 하네스
    • AI 하네스란 무엇인가
    • AI 코딩 에이전트의 주요 구성요소
    • Claude Skills
    • Claude Memory
    • Claude Hook
    • Claude Subagents
    • Claude Rules (Claude.md)
    • 참고) Claude Hook Matcher
  • Claude Code
    • Claude Code 입문
    • VS Code에서 Claude Code 사용하기
    • settings.json으로 권한과 실행 환경 제어하기

LangChain/LangGraph

  • 채팅 시작하기
    • LangChain • LangGraph wiki

OpenSearch

  • OpenSearch wiki
View Categories
  • Home
  • wiki
  • AI 코딩 에이전트 Wiki
  • AI 하네스
  • Claude Rules (Claude.md)

Claude Rules (Claude.md)

윤후 이
Updated on 6월 5, 2026

7 min read

Claude.md : 세션 전체의 기본 작업 기준 #

AI 코딩 에이전트는 매번 새로운 요청을 받을 때마다 프로젝트의 전체 맥락을 처음부터 완벽히 기억하지 못합니다. 그래서 프로젝트마다 반복적으로 지켜야 하는 기준을 별도의 규칙 파일에 적어 두고, 세션이 시작될 때 자동으로 읽게 만드는 장치가 필요합니다. Claude Code에서 이 역할을 하는 대표 파일이 CLAUDE.md입니다.

CLAUDE.md는 단순한 메모장이 아니라, 에이전트가 코드를 읽고 수정하고 명령을 실행할 때 참고하는 프로젝트 운영 헌장에 가깝습니다.

여기에 들어갈 내용은 “이번 한 번만 필요한 지시”가 아니라, 저장소를 다루는 동안 계속 적용되어야 하는 기준이어야 합니다.

Anthropic 문서에서도 CLAUDE.md는 Claude에게 지속적인 프로젝트 컨텍스트를 주기 위한 지시 파일로 설명되며, 내용이 짧고 구체적일수록 더 잘 따르는 경향이 있다고 안내합니다.

CLAUDE.md는 매 세션의 기본 지시문입니다. 프로젝트 구조, 코딩 표준, 테스트 명령, 금지사항처럼 자주 바뀌지 않고 모든 작업에 적용되는 내용을 넣습니다.

~/.claude/CLAUDE.md           # 전역: 개인 취향, 공통 개발 습관
./.claude/CLAUDE.md           # 프로젝트: 팀 공유 표준
./CLAUDE.md                   # 프로젝트 루트 표준
./.claude/CLAUDE.local.md     # 로컬 개인 노트, gitignore 권장

좋은 Rules는 짧고 명확해야 합니다.

  • 권장: 핵심 규칙 5~10개, 최대 200라인 내외
  • 권장: 코드 스니펫보다 파일 경로와 명령어를 참조
  • 회피: 특정 작업에서만 필요한 긴 절차
  • 회피: 자주 바뀌는 구현 세부사항

예시:

## Project Standards
- Python 3.12, FastAPI, LangGraph, Pydantic v2 사용
- TypeScript는 strict mode 유지
- 에러는 명시적으로 처리하고 조용히 삼키지 않음
- 테스트는 변경 범위에 맞춰 `pnpm test`, `pnpm lint` 우선 실행

Codex의 AGENTS.md #

Codex에서는 Claude의 CLAUDE.md와 비슷한 역할을 하는 파일로 AGENTS.md를 사용합니다.

OpenAI 공식 문서에 따르면 Codex는 작업을 시작하기 전에 AGENTS.md를 읽고, 전역 지침과 프로젝트별 지침을 계층적으로 결합해 일관된 작업 기준을 형성합니다.

Codex의 기본 구조는 다음처럼 이해할 수 있습니다.

~/.codex/AGENTS.md            # 전역: 개인 기본 지침
./AGENTS.md                   # 저장소 루트: 프로젝트 공통 지침
./subdir/AGENTS.md            # 하위 디렉터리: 영역별 세부 지침
AGENTS.override.md            # 기존 지침을 임시 또는 명시적으로 덮어쓰는 지침

카르파시의 Claude.md #

https://github.com/multica-ai/andrej-karpathy-skills/blob/main/CLAUDE.md

테슬라, OpenAI, Anthropic에 걸친 화려한 커리어를 가지신 카르파시가 작성하여 화제가 된 claude.md 규칙이 있습니다.

위 링크를 확인해주세요.

저는 위 규치를 확장하여 아래와 같이 사용하고 있습니다.

## 1. Prefer existing commands and skills

Before starting a non-trivial task, check whether a relevant command or skill exists.

Use command-driven workflows for structured tasks such as planning, implementation loops, stack management, verification, or multi-step coding work.

Do not duplicate a command's internal process in normal responses. If a command already defines the workflow, follow the command.

If the user explicitly names a command, use that command's intended workflow rather than improvising a parallel process.

## 2. Be clear before changing code

Do not assume hidden requirements.

Before making meaningful code changes, briefly identify the goal and any important assumptions.

If the task is ambiguous, ask a focused question or state the assumption you will proceed with.

Push back when the requested approach seems unnecessarily complex, risky, or inconsistent with the project.

## 3. Keep changes simple

Implement the smallest change that solves the requested problem.

Avoid speculative features, premature abstractions, and unnecessary configurability.

Do not add new dependencies unless clearly justified.

If a simpler solution exists, prefer it.

## 4. Make surgical edits

Touch only the files and lines needed for the task.

Do not refactor unrelated code.

Do not reformat unrelated sections.

Match the existing project style, even if another style might be preferable.

Remove only unused code introduced by your own changes unless the user asks for broader cleanup.

## 5. Verify work when practical

If code was changed, run the most relevant project check when feasible.

Prefer the existing project commands for tests, builds, linting, or type checking.

If a command or skill defines the verification process, follow that instead.

If verification cannot be run, say what was not verified and why.

## 6. Read actual errors

When something fails, inspect the real error message, stack trace, logs, or failing output.

Do not guess from memory before checking the concrete failure.

Fix the confirmed cause, not a similar-looking problem.

## 7. Be careful with destructive actions

Do not delete files, rewrite history, reset branches, drop databases, clear indexes, or run destructive scripts unless the user explicitly asks or the active command requires it.

Before irreversible actions, explain the risk and confirm when appropriate.

## 8. Git behavior

Do not commit automatically unless the user asks or the active command explicitly includes commit behavior.

When making commits, keep each commit to one logical change.

Use concise, semantic commit messages.

## 9. Korean response style

When the user writes in Korean, respond in Korean unless there is a clear reason not to.

End Korean sentences with `.`, `?`, or `!`, not with a closing colon.

Colons are fine inside code, key-value pairs, labels, and command examples.

## 10. New file headers

When creating a new source file, add a one-line Korean comment at the top explaining the file's role.

Place it below required directives such as `'use client'`, `'use server'`, or a shebang.

Skip this for config files, JSON files, lock files, generated files, and files where such a comment would be inappropriate.
CLAUDE.md, rules
글이 도움이 되셨나요?
공유하기
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Updated on 6월 5, 2026
Claude Subagents참고) Claude Hook Matcher

답글 남기기 응답 취소

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다


목차
  • Claude.md : 세션 전체의 기본 작업 기준
    • Codex의 AGENTS.md
    • 카르파시의 Claude.md

Hangbok Archive

모든 권리 보유