후원 Sora2Prompt AI, 무료 Sora 2 프롬프트 생성기

CLAUDE.md 파일 설정

읽는 시간: 5분빠른 튜토리얼

특정 프로젝트에 대한 Claude Code의 효과를 극대화하기 위해 프로젝트별 설정과 컨텍스트를 구성하세요.

CLAUDE.md란 무엇인가요?

CLAUDE.md는 Claude Code에 지속적인 컨텍스트와 프로젝트별 설정을 제공할 수 있는 특별한 구성 파일입니다. Claude가 프로젝트를 더 잘 이해하고 더 정확한 지원을 제공하는 데 도움이 됩니다.

주요 이점

  • 세션 간 지속적인 프로젝트 컨텍스트
  • 프로젝트별 요구 사항에 대한 맞춤형 구성
  • 향상된 코드 권장 사항
  • 프로젝트 아키텍처에 대한 더 나은 이해
  • 반복적인 설명의 필요성 감소

기본 CLAUDE.md 파일 생성

기본 CLAUDE.md 파일 구조로 시작해 봅시다:

1단계: 파일 생성

프로젝트의 루트 디렉토리에 CLAUDE.md라는 파일을 생성하세요:

# Project: My Awesome App

## Project Description
A brief description of what your project does and its main features.

## Tech Stack
- Frontend: React, TypeScript
- Backend: Node.js, Express
- Database: MongoDB
- Testing: Jest, React Testing Library

## Code Conventions
- We use Prettier for formatting
- ESLint for linting
- Functional components with hooks for React
- 2-space indentation
- camelCase for variables and functions
- PascalCase for components and classes

## Project Structure
- /src - Main source code
  - /components - React components
  - /pages - Page components
  - /api - API routes
  - /utils - Utility functions
  - /hooks - Custom React hooks
  - /styles - CSS/SCSS files
- /public - Static assets
- /tests - Test files

2단계: 컨텍스트별 섹션 추가

더 구체적인 컨텍스트로 CLAUDE.md를 향상시키세요:

## Important Notes
- User authentication uses JWT stored in HttpOnly cookies
- API calls should use the client utility in /src/utils/api.ts
- New components should have a companion test file
- State management uses React Context + useReducer

## Known Issues
- Performance issues with large data sets in the dashboard component
- Mobile menu animation is choppy on older iOS devices

## Future Plans
- Implementing real-time updates with WebSockets
- Adding a dark mode theme
- Migrating to Next.js for improved SEO

고급 구성

다음 고급 기능으로 CLAUDE.md 파일을 한 단계 업그레이드하세요:

사용자 지정 지침

프로젝트 작업 시 Claude가 어떻게 동작해야 하는지에 대한 구체적인 지침을 추가하세요:

## Instructions for Claude
- Always suggest TypeScript types for new functions
- Prioritize performance optimizations
- Use React Query for data fetching
- Follow the existing error handling pattern
- Include JSDoc comments for public functions
- Prefer functional programming approaches

환경 구성

개발 환경에 대한 정보를 제공하세요:

## Environment Setup
- Node.js v16+
- npm scripts:
  - `npm start` - Start development server
  - `npm test` - Run tests
  - `npm run build` - Build for production
  - `npm run lint` - Run linter
- Environment variables (examples, not actual values):
  - API_URL=http://localhost:3001
  - DEBUG=false
  - FEATURE_FLAGS_ENABLED=true

아키텍처 다이어그램

아키텍처를 시각화하기 위해 Mermaid 다이어그램을 포함하세요:

## Architecture

```mermaid
graph TD
    A[Client] --> B[API Gateway]
    B --> C[Auth Service]
    B --> D[User Service]
    B --> E[Content Service]
    C --> F[(Auth DB)]
    D --> G[(User DB)]
    E --> H[(Content DB)]
```

## Component Relationships

```mermaid
graph TD
    A[App] --> B[Layout]
    B --> C[Header]
    B --> D[Main Content]
    B --> E[Footer]
    D --> F[Dashboard]
    F --> G[UserStats]
    F --> H[ActivityFeed]
    F --> I[Recommendations]
```

모범 사례

효과적인 CLAUDE.md 파일을 유지하기 위해 다음 모범 사례를 따르세요:

최신 상태 유지

  • 프로젝트 아키텍처가 변경될 때마다 CLAUDE.md 업데이트
  • 프로젝트 복잡도가 증가하면 새 섹션 추가
  • 오래된 정보 제거
  • 살아있는 문서로 취급

여러 CLAUDE.md 파일 사용

대규모 프로젝트의 경우 다양한 디렉토리에 여러 CLAUDE.md 파일 사용을 고려하세요:

  • /CLAUDE.md - 루트 프로젝트 컨텍스트
  • /frontend/CLAUDE.md - 프론트엔드 관련 세부 정보
  • /backend/CLAUDE.md - 백엔드 관련 세부 정보
  • /docs/CLAUDE.md - 문서 가이드라인

버전 제어

  • 저장소에 CLAUDE.md 커밋
  • 코드 리뷰 중 CLAUDE.md 변경 사항 검토
  • Definition of Done에 CLAUDE.md 업데이트 추가 고려

관련 튜토리얼

Claude Code 워크플로를 향상시키기 위해 다음 관련 튜토리얼을 탐색하세요: