☰ 분류

CLAUDE.md 생성 프롬프트

프로젝트 세부 정보를 넣으면 AI 코딩 에이전트용 CLAUDE.md 파일을 150줄 미만으로 생성하도록 합니다. 개요, 구조, 명령어, 규칙, 주의점, 포인터 섹션을 포함합니다.

분류개발 › 기술 문서
태그초안작성개발자코드템플릿
프롬프트 (영어 본문 · 답은 한국어로 옵니다)
You are a CLAUDE.md architect — an expert at writing concise, high-impact project instruction files for AI coding agents (Claude Code, Cursor, Windsurf, Zed, etc.).

Your task: Generate a production-ready CLAUDE.md file based on the project details I provide.

## Principles You MUST Follow

1. **Conciseness is king.** The final file MUST be under 150 lines. Every line must earn its place. If Claude already does something correctly without the instruction, omit it.
2. **WHY → WHAT → HOW structure.** Start with purpose, then tech/architecture, then workflows.
3. **Progressive disclosure.** Don't inline lengthy docs. Instead, point to file paths: "For auth patterns, see src/auth/README.md". Claude will read them when needed.
4. **Actionable, not theoretical.** Only include instructions that solve real problems — commands you actually run, conventions that actually matter, gotchas that actually bite.
5. **Provide alternatives with negations.** Instead of "Never use X", write "Never use X; prefer Y instead" so the agent doesn't get stuck.
6. **Use emphasis sparingly.** Reserve IMPORTANT/YOU MUST for 2-3 critical rules maximum.
7. **Verify, don't trust.** Always include how to verify changes (test commands, type-check commands, lint commands).

## Output Structure

Generate the CLAUDE.md with exactly these sections:

### Section 1: Project Overview (3-5 lines max)
- Project name, one-line purpose, and core tech stack.

### Section 2: Architecture Map (5-10 lines max)
- Key directories and what they contain.
- Entry points and critical paths.
- Use a compact tree or flat list — no verbose descriptions.

### Section 3: Common Commands
- Build, test (single file + full suite), lint, dev server, and deploy commands.
- Format as a simple reference list.

### Section 4: Code Conventions (only non-obvious ones)
- Naming patterns, file organization rules, import ordering.
- Skip anything a linter/formatter already enforces automatically.

### Section 5: Gotchas & Warnings
- Project-specific traps and quirks.
- Things Claude tends to get wrong in this type of project.
- Known workarounds or fragile areas of the codebase.

### Section 6: Git & Workflow
- Branch naming, commit message format, PR process.
- Only include if the team has specific conventions.

### Section 7: Pointers (Progressive Disclosure)
- List of files Claude should read for deeper context when relevant:
  "For API patterns, see @docs/api-guide.md"
  "For DB migrations, see @prisma/README.md"

## What I'll Provide

I will describe my project with some or all of the following:
- Tech stack (languages, frameworks, databases, etc.)
- Project structure overview
- Key conventions my team follows
- Common pain points or things AI agents keep getting wrong
- Deployment and testing workflows

If I provide minimal info, ask me targeted questions to fill the gaps — but never more than 5 questions at a time.

## Quality Checklist (apply before outputting)

Before generating the final file, verify:
- [ ] Under 150 lines total?
- [ ] No generic advice that any dev would already know?
- [ ] Every "don't do X" has a "do Y instead"?
- [ ] Test/build/lint commands are included?
- [ ] No @-file imports that embed entire files (use "see path" instead)?
- [ ] IMPORTANT/MUST used at most 2-3 times?
- [ ] Would a new team member AND an AI agent both benefit from this file?

Now ask me about my project, or generate a CLAUDE.md if I've already provided enough detail.

어떤 프롬프트인가

프로젝트별 에이전트 지침 파일을 간결하게 만들 때 적합하다. 불필요한 이론보다 실제 명령어, 검증 방법, 프로젝트 특유의 함정과 참조 파일을 중시한다.

모델 비교

ChatGPT가 형식·분량·구체성에서 가장 우수하지만 일부 추정이 있다. Gemini는 과잉 설명과 허구 정보가 많고, [C]는 답이 없다.

ChatGPT종합 1위
42/ 50

+ 요구된 7개 섹션과 핵심 규칙을 간결하게 반영했다.

- Redis 용도와 일부 경로·규칙을 근거 없이 추정했다.

Gemini
28/ 50

+ 명령어와 핵심 경고를 실무적으로 명확히 제시했다.

- 미제공 아키텍처·브랜치·배포 정보를 다수 지어냈다.

기준ChatGPTGemini앞선 모델
지시 준수96ChatGPT +50%
정확성74ChatGPT +75%
구체성87ChatGPT +14%
구성·가독성96ChatGPT +50%
분량 적정성95ChatGPT +80%

gpt-5.6-sol가 모델 이름을 가린 채 1~10점으로 채점했습니다 (2026-09-24). 측정값이 아니라 AI 심사 결과입니다.

답 전문 보기

같은 입력을 세 모델에 넣어 받은 답을 그대로 옮겼습니다. 각 CLI(에이전트 하네스)에서 실행했습니다. ChatGPT·Claude 앱이나 웹에서는 답이 다를 수 있습니다.

넣은 입력
[붙여 넣은 자료]
프로젝트명: 핀들리(Finly) 가계부 서비스 백엔드
기술 스택: Node.js 20, TypeScript, NestJS, PostgreSQL 15, Prisma, Redis, Docker
구조: src/modules/{auth,transactions,budgets,notifications}, 모듈별 controller/service/dto/spec 구성
명령어: 빌드 pnpm build / 전체 테스트 pnpm test, 단일 파일 pnpm test transactions.service.spec.ts / 린트 pnpm lint / 개발서버 pnpm start:dev
배포: GitHub Actions에서 Docker 이미지 빌드 후 앱 서버(158.247.203.55)로 SSH 배포
컨벤션: DTO는 class-validator 데코레이터 필수, 모듈 간 직접 import 금지(shared 모듈 경유만 허용)
자주 겪는 문제: Claude가 Prisma 마이그레이션 파일을 손으로 고치려 함(항상 prisma migrate dev로 생성해야 함), 금액 계산에 Decimal 타입을 써야 하는데 자꾸 number로 바꿔버림
커밋 컨벤션: feat/fix/chore 접두사 + 이슈번호, PR은 최소 1명 승인 필요
gpt-5.6-luna (codex CLI · 에이전트 하네스) · 실행일 2026-09-24

CLAUDE.md

1. Project Overview

핀들리(Finly)는 개인 재무 관리를 위한 가계부 서비스 백엔드다.
Node.js 20, TypeScript, NestJS 기반이며 PostgreSQL 15와 Prisma를 사용한다.
Redis는 캐시 및 알림 관련 처리에 사용하고, Docker로 배포한다.

2. Architecture Map

src/
└── modules/
    ├── auth/            # 인증
    ├── transactions/    # 거래 내역
    ├── budgets/         # 예산
    └── notifications/   # 알림
  • 각 모듈은 controller, service, dto, spec 구조를 따른다.
  • NestJS 애플리케이션 진입점은 src/main.ts다.
  • Prisma 스키마와 마이그레이션은 prisma/에 있다.
  • 공통 기능은 shared 모듈을 통해 제공한다.
  • 모듈 간 직접 import는 금지하며 shared 모듈을 경유한다.

3. Common Commands

  • 개발 서버: pnpm start:dev
  • 빌드: pnpm build
  • 전체 테스트: pnpm test
  • 단일 테스트: pnpm test transactions.service.spec.ts
  • 린트: pnpm lint
  • 배포: GitHub Actions에서 Docker 이미지를 빌드한 뒤 앱 서버로 SSH 배포
  • 배포 대상: 158.247.203.55
  • Prisma 마이그레이션 생성/적용: pnpm prisma migrate dev

변경 후 최소한 관련 단일 테스트와 pnpm lint를 실행하고, 배포 전 pnpm build와 전체 테스트를 실행한다.

4. Code Conventions

  • 모든 DTO 입력 필드에는 적절한 class-validator 데코레이터를 적용한다.
  • 금액과 금융 계산에는 Prisma Decimal을 사용한다. number로 변환하지 않는다.
  • 모듈 간 의존성이 필요하면 직접 import하지 말고 shared 모듈을 사용한다.
  • 테스트 파일은 대상 구현 파일과 같은 모듈의 spec 영역에 둔다.
  • DTO, 서비스, 컨트롤러의 책임을 섞지 말고 기존 모듈 구조를 유지한다.

5. Gotchas & Warnings

  • Prisma 마이그레이션 파일을 직접 수정하지 않는다. 스키마를 변경한 뒤 pnpm prisma migrate dev로 생성한다.
  • 금액 비교·합산·저장 과정에서 Decimal 정밀도를 유지한다. 일반 산술 연산을 위해 임의로 number로 바꾸지 않는다.
  • 모듈 간 직접 import가 필요해 보여도 shared 모듈에 추상화하거나 공통 기능을 이동한다.
  • 운영 서버에 수동 SSH 배포하지 말고 GitHub Actions 배포 흐름을 사용한다.
  • 데이터베이스 스키마 변경 후에는 관련 마이그레이션과 테스트를 함께 확인한다.

6. Git & Workflow

  • 커밋 메시지는 feat: #이슈번호 설명, fix: #이슈번호 설명, chore: #이슈번호 설명 형식을 따른다.
  • PR은 최소 1명의 승인이 있어야 병합한다.
  • 기능·수정 작업은 관련 이슈번호를 커밋과 PR에 포함한다.

7. Pointers

  • Prisma 스키마 및 마이그레이션: prisma/
  • CI/CD 및 배포 설정: .github/workflows/
  • 모듈별 구현 및 테스트: src/modules/
  • 공통 모듈 및 모듈 간 연계 규칙: src/shared/

같은 분류의 프롬프트

FTTH 통신 전문가 역할을 맡기는 프롬프트
개발자 아키텍처 안내 프롬프트
LLM 입문서 작성 프롬프트
프로그래밍 팀 구성 프롬프트
CLAUDE.md 조립 프롬프트