Claude Code 101로 돌아가기Back to Claude Code 101
Module 08 — 실전 워크플로우Module 08 — Real-world Workflow

실전
워크플로우
Real-world
Workflow

Claude Code로 실제 개발하는 전체 흐름을 마스터합시다Master the complete development process with Claude Code

Plan Mode Git 워크플로우Git Workflow
스크롤Scroll
01

Plan Mode — 먼저 계획, 그 다음 실행Plan Mode — Plan First, Then Execute

위험한 변경 전에 Claude가 읽기 전용 모드로 코드베이스를 탐색하고 계획을 세운 뒤, 사용자 승인을 받고 나서 실행합니다.Before risky changes, Claude explores the codebase in read-only mode, drafts a plan, and only executes after your approval.

외과의사가 수술 전에 MRI를 먼저 보듯

복잡한 기능을 구현하거나 대규모 리팩토링을 앞뒀을 때, Claude가 먼저 파일을 읽고 의존성을 파악한 뒤 계획을 제시합니다.

여러분은 그 계획을 검토하고 승인한 뒤에야 실제 코드 수정이 시작됩니다. 실수를 예방하는 가장 효과적인 방법입니다.

Like a surgeon reviewing the MRI before operating

When implementing complex features or large-scale refactoring, Claude first reads the files, understands dependencies, and presents a plan.

You review that plan, and actual code modifications only begin after your approval. It's the most effective way to prevent mistakes.

Plan Mode 켜는 방법How to Enable Plan Mode

세션 중 전환Toggle During Session

Shift+Tab 두 번 누르기

첫 번째: Auto-Accept Mode
두 번째: Plan Mode

터미널 하단에 ⏸ plan mode on 표시됨
Press Shift+Tab twice

First: Auto-Accept Mode
Second: Plan Mode

Terminal shows ⏸ plan mode on

🚀

처음부터 Plan ModeStart in Plan Mode

Claude를 Plan Mode로 시작하려면:To start Claude in Plan Mode:

claude --permission-mode plan
⚙️

기본값으로 설정Set as Default

.claude/settings.json에 추가:Add to .claude/settings.json:

// .claude/settings.json { "permissions": { "defaultMode": "plan" } }

Plan Mode 실제 흐름Plan Mode Flow

1

Plan Mode 활성화 후 작업 요청Activate Plan Mode and Request Task

Shift+Tab 두 번으로 Plan Mode를 켜고, 구현하고 싶은 기능을 설명합니다.Enable Plan Mode with Shift+Tab twice, then describe the feature you want to implement.

Plan Mode 활성화Activate Plan Mode
# Shift+Tab 두 번 → plan mode on You: "인증 시스템을 OAuth2로 전환하는 마이그레이션 계획을 세워줘."
2

Claude가 읽기 전용으로 탐색Claude Explores in Read-only Mode

이 단계에서 Claude는 파일을 수정하지 않습니다. 코드베이스를 탐색하고, 의존성을 파악하며, 영향 범위를 분석합니다.At this stage, Claude does not modify files. It explores the codebase, understands dependencies, and analyzes the scope of impact.

3

계획 제시 & 질문Present Plan & Ask Questions

Claude가 단계별 실행 계획을 제시하고, 필요한 경우 추가 요구사항을 질문합니다. Ctrl+G를 누르면 계획을 텍스트 편집기에서 직접 수정할 수 있습니다.Claude presents a step-by-step execution plan and asks clarifying questions if needed. Press Ctrl+G to edit the plan directly in a text editor.

Claude의 계획 예시Example Plan from Claude
Claude: # OAuth2 마이그레이션 계획 # 1단계: 현재 JWT 인증 분석 (영향 파일: 8개) # 2단계: OAuth2 라이브러리 설치 및 설정 # 3단계: 로그인 플로우 리팩토링 # 4단계: 토큰 갱신 로직 마이그레이션 # 5단계: 테스트 업데이트 # 예상 작업 시간: 2시간 # 하위 호환성 유지 방법은?
4

승인 후 실행Execute After Approval

계획을 확인하고 승인하면, Claude가 Plan Mode를 해제하고 실제 코드 수정을 시작합니다.Once you review and approve the plan, Claude exits Plan Mode and begins actual code modifications.

승인Approval
You: "좋아. 하위 호환성은 6개월 유지해줘. 실행해." → Claude가 계획대로 코드 수정 시작
💡
언제 Plan Mode를 쓸까: 여러 파일에 걸친 대규모 변경, 낯선 코드베이스 탐색, 되돌리기 어려운 작업(DB 스키마 변경, 인프라 수정 등)에 특히 효과적입니다.When to use Plan Mode: Especially effective for large changes spanning multiple files, exploring unfamiliar codebases, and hard-to-reverse operations (DB schema changes, infrastructure modifications, etc.).
02

체크포인팅 & 되돌리기 (Undo)Checkpointing & Undo

Claude Code는 파일을 수정하기 전에 자동으로 스냅샷을 찍습니다. 잘못된 변경은 언제든 Esc+Esc로 되돌릴 수 있습니다.Claude Code automatically takes snapshots before modifying files. Any incorrect change can be undone at any time with Esc+Esc.

게임의 자동 저장 기능처럼

게임에서 보스 전 자동 저장이 되듯, Claude Code도 편집 전에 파일 상태를 저장합니다.

이 체크포인트는 Git과 별도로 작동합니다. Git 커밋을 하지 않았어도 Claude의 각 작업 단위별로 스냅샷이 생성됩니다.

Like an auto-save in a game

Just as games auto-save before a boss fight, Claude Code saves file states before editing.

These checkpoints operate independently of Git. Snapshots are created per Claude action unit, even without Git commits.

Esc+Esc로 즉시 되돌리기Instant Undo with Esc+Esc

Claude가 파일을 수정하는 도중 또는 직후에 Esc를 두 번 누르면, 해당 작업 이전 상태로 파일이 복원됩니다.During or right after Claude modifies files, press Esc twice to restore files to the state before that action.

# Claude가 파일을 수정 중... Esc Esc → 수정 이전 스냅샷으로 복원됨 # Git 커밋 여부와 무관하게 동작
⚠️

Git과의 차이점Difference from Git

체크포인팅은 Claude Code 내부 기능입니다. Git revert/reset과 병행 사용하면 더욱 안전합니다.Checkpointing is a Claude Code internal feature. Using it alongside Git revert/reset provides even more safety.

Git Undo
커밋 단위 되돌리기 git revert / git resetRevert by commit unit git revert / git reset
Claude Undo
작업 단위 되돌리기 Esc+Esc (즉시)Revert by action unit Esc+Esc (instant)
💡
실전 활용: Claude가 예상과 다른 방향으로 코드를 수정하기 시작하면, 완전히 끝날 때까지 기다리지 말고 Esc+Esc로 즉시 중단하세요. 그리고 더 명확한 지시사항으로 다시 요청하면 됩니다.Practical use: If Claude starts modifying code in an unexpected direction, don't wait until it finishes — use Esc+Esc to stop immediately. Then re-request with clearer instructions.
03

세션 재개 & 포크Session Resume & Fork

이전 대화를 이어서 계속하거나, 세션을 포크해서 다른 방향으로 실험할 수 있습니다.You can continue previous conversations, or fork a session to experiment in a different direction.

▶️

최근 세션 이어하기Continue Recent Session

현재 디렉토리에서 가장 최근 대화를 자동으로 이어서 시작합니다.Automatically continues the most recent conversation in the current directory.

claude --continue
📋

세션 선택해서 재개Select & Resume Session

대화형 선택기를 열거나, 세션 이름으로 바로 재개합니다.Open an interactive picker or resume directly by session name.

# 선택기 열기 / Open picker claude --resume # 이름으로 바로 재개 / Resume by name claude --resume auth-refactor # 세션 이름 붙이기 (세션 중) / Rename session /rename auth-refactor
🔀

세션 포크 (Fork)Fork Session

원본 세션을 유지하면서, 다른 방향으로 실험할 수 있는 새 분기를 만듭니다.Creates a new branch to experiment in a different direction while keeping the original session intact.

# 원본 영향 없이 분기 / Fork without affecting original claude --continue --fork-session

세션 선택기 키보드 단축키Session Picker Keyboard Shortcuts

단축키Shortcut 동작Action
↑ / ↓세션 간 이동Navigate sessions
Enter선택한 세션 재개Resume selected session
P세션 내용 미리보기Preview session content
R세션 이름 변경Rename session
/세션 검색 필터Search/filter sessions
B현재 git 브랜치 세션만 표시Show only current git branch sessions
Esc선택기 종료Close picker
💡
포크 활용 사례: "TypeScript로 마이그레이션" 세션에서 두 가지 전략(점진적 vs 한 번에 전환)을 각각 실험하고 싶을 때, 원본 세션을 포크해서 둘 다 시도해볼 수 있습니다. 원본 대화는 그대로 보존됩니다.Fork use case: In a "Migrate to TypeScript" session, if you want to experiment with two strategies (incremental vs. all-at-once), fork the original session to try both. The original conversation is preserved.
04

Git Worktrees로 병렬 Claude 세션Parallel Claude Sessions with Git Worktrees

여러 기능을 동시에 개발할 때, Git Worktree를 사용하면 각 Claude 세션이 독립된 작업 디렉토리에서 충돌 없이 실행됩니다.When developing multiple features simultaneously, Git Worktrees allow each Claude session to run in an independent working directory without conflicts.

병렬 우주처럼 — 같은 저장소, 다른 작업 공간

Git Worktree는 동일한 저장소 히스토리와 원격 연결을 공유하면서, 각각 자신의 파일과 브랜치를 가진 별도의 작업 디렉토리를 만듭니다.

한 Worktree에서 기능을 개발하는 동안, 다른 Worktree에서 버그를 수정할 수 있고, 두 Claude 세션은 서로 방해하지 않습니다.

Like parallel universes — same repo, different workspaces

Git Worktrees share the same repository history and remote connections, but create separate working directories, each with its own files and branch.

While developing a feature in one Worktree, you can fix bugs in another, and the two Claude sessions don't interfere with each other.

방법 1: Claude 내장 --worktree 플래그 (권장)Method 1: Claude's Built-in --worktree Flag (Recommended)

--worktree 플래그 사용
# "feature-auth" worktree에서 Claude 시작 # .claude/worktrees/feature-auth/ 디렉토리 자동 생성 claude --worktree feature-auth # 별도 터미널에서 다른 작업용 worktree 시작 claude --worktree bugfix-123 # 이름 자동 생성 (예: bright-running-fox) claude --worktree

방법 2: Git 명령어로 수동 생성Method 2: Manual Creation with Git Commands

Git worktree 수동 관리
# 새 브랜치로 worktree 생성 git worktree add ../feature-branch -b feature-branch # 해당 worktree에서 Claude 실행 cd ../feature-branch && claude # 다른 터미널: 기존 브랜치로 또 다른 worktree git worktree add ../bugfix bugfix-123 cd ../bugfix && claude # 완료 후 정리 git worktree list git worktree remove ../feature-branch

자동 정리 (--worktree 사용 시)Auto Cleanup (when using --worktree)

세션 종료 시 Claude가 자동으로 처리합니다:Claude handles this automatically when the session ends:

  • 변경사항 없음 → worktree & 브랜치 자동 삭제No changes → worktree & branch auto-deleted
  • 변경사항 있음 → 유지 또는 삭제 선택 가능Has changes → choose to keep or delete
💡

권장 설정Recommended Setup

.gitignore에 추가하여 worktree 내용이 주 저장소에 추적되지 않도록 합니다:Add to .gitignore so worktree contents are not tracked in the main repository:

.claude/worktrees/
💡
실전 활용: 각 새 worktree에서 개발 환경 초기화가 필요할 수 있습니다. npm install, 가상환경 설정 등 프로젝트의 표준 설정 과정을 따르세요.Practical use: Each new worktree may need development environment initialization. Follow the project's standard setup process: npm install, virtual environment setup, etc.
05

Extended Thinking & ultrathink

Claude가 응답 전에 더 깊이 추론하도록 설정할 수 있습니다. 복잡한 아키텍처 결정, 어려운 버그, 트레이드오프 분석에 탁월합니다.You can configure Claude to reason more deeply before responding. Excellent for complex architecture decisions, difficult bugs, and trade-off analysis.

"빠른 답" vs "충분히 생각한 답"

Extended Thinking은 Claude가 응답하기 전에 내부적으로 더 많이 추론하는 시간을 줍니다.

기본적으로 활성화되어 있으며, ultrathink 키워드를 프롬프트에 포함하면 해당 턴의 추론 깊이를 최고 수준으로 높일 수 있습니다.

"Quick answer" vs "Well-considered answer"

Extended Thinking gives Claude more time to reason internally before responding.

It is enabled by default, and including the ultrathink keyword in your prompt maximizes reasoning depth for that turn.

ultrathink 사용 방법How to Use ultrathink

ultrathink 프롬프트 예시ultrathink Prompt Examples
# 복잡한 아키텍처 결정에 You: "ultrathink — 마이크로서비스 vs 모노레포 중 우리 팀 상황에 최적인 구조를 분석해줘." # 찾기 어려운 버그 디버깅에 You: "ultrathink — 이 레이스 컨디션 버그의 근본 원인을 찾아줘." # 성능 최적화 전략 수립에 You: "ultrathink — 현재 DB 쿼리 구조에서 병목 지점과 최적화 방안을 제시해줘."

Extended Thinking 설정 옵션Extended Thinking Configuration Options

방법Method 설명Description
ultrathink 키워드keyword 프롬프트에 포함 시 해당 턴의 추론 깊이를 최고(high)로 설정. 설정은 영구적으로 변경되지 않음When included in a prompt, sets reasoning depth to maximum (high) for that turn. Setting is not permanently changed.
Option+T / Alt+T 현재 세션에서 Extended Thinking 켜기/끄기 토글Toggle Extended Thinking on/off for the current session
/config 에서 토글toggle 모든 프로젝트에 기본값 설정 (alwaysThinkingEnabled로 저장됨)Set default for all projects (saved as alwaysThinkingEnabled)
Ctrl+O Claude의 내부 추론 과정 보기 (자세한 모드 토글)View Claude's internal reasoning process (toggle verbose mode)
⚠️
주의: "think", "think hard", "think more" 같은 구문은 일반 프롬프트 지시로 해석됩니다. 추론 깊이를 높이려면 반드시 ultrathink 키워드를 사용하세요.Note: Phrases like "think", "think hard", "think more" are interpreted as regular prompt instructions. To increase reasoning depth, you must use the ultrathink keyword.
06

내장 Skills: /simplify & /batchBuilt-in Skills: /simplify & /batch

Claude Code에는 특정 작업을 위한 내장 Skill 명령어가 있습니다. 기능 구현 후 코드 정리, 대규모 병렬 변경 작업에 활용하세요.Claude Code has built-in Skill commands for specific tasks. Use them for code cleanup after implementation and large-scale parallel changes.

/simplify — 구현 후 코드 정리/simplify — Post-implementation Cleanup

기능 구현이 끝난 뒤 자동으로 코드를 정리합니다. 불필요한 복잡성 제거, 가독성 향상, 중복 코드 통합을 수행합니다.Automatically cleans up code after feature implementation. Removes unnecessary complexity, improves readability, and consolidates duplicate code.

# 기능 구현 완료 후 실행 / Run after feature implementation /simplify → Claude가 방금 작성한 코드를 검토하고 불필요한 복잡성을 제거합니다

/batch — 대규모 병렬 변경/batch — Large-scale Parallel Changes

여러 파일에 걸친 대규모 변경을 병렬로 처리합니다. 전체 코드베이스의 패턴 교체, 일괄 마이그레이션 등에 활용합니다.Handles large-scale changes across multiple files in parallel. Use for pattern replacement across the entire codebase, bulk migrations, etc.

# 대규모 일괄 변경 시 / For large-scale batch changes /batch → 여러 파일의 변경을 병렬로 효율적으로 처리합니다

실전 사용 예시Real-world Usage Examples

/simplify 활용
# 기능 구현 직후 You: "사용자 인증 미들웨어 구현 완료. /simplify로 코드 정리해줘." Claude: # 중첩된 if-else를 early return 패턴으로 정리 # 중복 에러 핸들링 코드 3군데 → 공통 함수로 추출 # 불필요한 주석 제거 및 변수명 명확화 # 코드 라인: 180 → 120 (-33%)
/batch 활용
# 전체 코드베이스 일괄 변경 You: "src/ 폴더의 모든 파일에서 console.log를 logger.info로 교체해줘. /batch 사용." Claude: # 47개 파일에서 병렬로 교체 작업 진행 # 완료: 47/47 파일, console.log 총 203개 교체
💡
워크플로우 통합: 기능 구현 → /simplify로 정리 → 테스트 실행 → 커밋. 이 패턴을 습관화하면 항상 깔끔한 코드를 유지할 수 있습니다.Workflow integration: Implement feature → clean up with /simplify → run tests → commit. Making this pattern a habit keeps your code consistently clean.
07

Claude Code + Git = 최강 조합Claude Code + Git = Ultimate Combination

Claude Code는 Git을 네이티브로 이해합니다. 커밋, 브랜치, PR까지 — 대화만으로 Git 워크플로우 전체를 다룰 수 있습니다.Claude Code understands Git natively. Commits, branches, PRs — you can handle the entire Git workflow through conversation.

자동 비서가 Git도 다룬다

회사에 새로 온 인턴에게 "이 기능 만들고, 브랜치 따서, 커밋하고, PR 올려줘"라고 하면 보통 몇 시간이 걸립니다.

Claude Code는 그 인턴이 Git 10년차 시니어인 셈입니다.
코드 변경사항을 분석해서 의미 있는 커밋 메시지를 작성하고, 브랜치 이름을 규칙에 맞게 만들고, PR 설명까지 자동으로 생성합니다.

여러분은 "해줘"라고 말하기만 하면 됩니다.

Your automated assistant who handles Git too

Telling a new intern "implement this feature, create a branch, commit, and open a PR" usually takes hours.

Claude Code is like that intern being a 10-year Git veteran.
It analyzes code changes to write meaningful commit messages, creates branch names following conventions, and auto-generates PR descriptions.

You just say "do it."

📝

자동 커밋 메시지Auto Commit Messages

변경사항을 분석해서 Conventional Commits 형식의 커밋 메시지를 자동 생성합니다. "feat:", "fix:", "refactor:" 등 컨벤션을 완벽히 지킵니다.Analyzes changes and auto-generates commit messages in Conventional Commits format. Perfectly follows conventions like "feat:", "fix:", "refactor:", etc.

🌿

브랜치 관리Branch Management

기능별 브랜치 생성, 체크아웃, 머지까지 대화로 처리합니다. "로그인 기능 브랜치 만들어줘"라고 하면 feature/login을 생성합니다.Handles branch creation, checkout, and merge through conversation. Saying "create a branch for the login feature" creates feature/login.

🚀

PR 생성PR Creation

변경사항을 요약하고, 리뷰어가 이해하기 쉬운 PR 설명을 자동으로 작성합니다. 테스트 계획, 스크린샷 섹션까지 포함합니다.Summarizes changes and auto-writes PR descriptions easy for reviewers to understand. Includes test plans and screenshot sections.

기본 Git 워크플로우Basic Git Workflow

Claude Code — Git 기본 흐름
# 1. 현재 상태 확인 You: "지금 Git 상태 어때?" → Claude가 git status, 최근 커밋, 브랜치 정보를 요약해줍니다 # 2. 커밋하기 You: "변경사항 커밋해줘" → 변경 내용을 분석하고 적절한 커밋 메시지를 작성합니다 # 3. 기능별로 나눠서 커밋 You: "UI 변경과 로직 변경을 분리해서 커밋해줘" → 파일별로 의미 단위로 나눠서 여러 커밋을 생성합니다
08

브랜치 → 작업 → 커밋 → PR 전체 흐름Branch → Work → Commit → PR Full Flow

실제 개발에서 가장 많이 쓰는 6단계 흐름을 Claude Code로 진행하는 방법입니다.Here's how to run the 6-step flow most commonly used in real development with Claude Code.

1

Feature 브랜치 생성 요청Request Feature Branch Creation

새 기능 작업의 시작점입니다. Claude에게 브랜치 생성을 요청합니다.The starting point for new feature work. Request Claude to create a branch.

Step 1: 브랜치 생성Step 1: Create Branch
You: "사용자 프로필 수정 기능을 만들 거야. 브랜치 만들어줘." Claude: # feature/user-profile-edit 브랜치를 생성하고 체크아웃했습니다. # main 브랜치의 최신 커밋 기반으로 만들었습니다.
2

기능 구현 요청Request Feature Implementation

실제 코드를 작성합니다. 구체적으로 요구사항을 전달하세요.Write the actual code. Pass requirements concretely.

Step 2: 기능 구현Step 2: Implement Feature
You: "프로필 수정 페이지를 만들어줘. - 이름, 이메일, 프로필 사진 변경 가능 - 저장 버튼 클릭 시 API 호출 - 유효성 검사 포함 - 기존 UserProfile 컴포넌트 스타일과 동일하게" Claude: # ProfileEditPage.tsx, useProfileEdit.ts, profileApi.ts 파일을 생성했습니다. # 기존 UserProfile의 디자인 시스템을 따랐습니다.
3

테스트 작성 요청Request Test Writing

구현한 기능에 대한 테스트를 작성합니다.Write tests for the implemented feature.

Step 3: 테스트 작성Step 3: Write Tests
You: "방금 만든 프로필 수정 기능에 대한 테스트를 작성해줘. - 유효성 검사 케이스 - API 성공/실패 케이스 - 사용자 인터랙션 테스트" Claude: # ProfileEditPage.test.tsx를 생성했습니다. # 12개의 테스트 케이스를 작성했고 모두 통과합니다.
4

커밋 요청 (기능별 분리)Request Commit (Separate by Feature)

변경사항을 의미 단위로 나눠서 커밋합니다. 리뷰어가 이해하기 쉬워집니다.Commit changes in meaningful units. This makes it easier for reviewers to understand.

Step 4: 기능별 커밋Step 4: Commit by Feature
You: "변경사항을 기능별로 나눠서 커밋해줘. API 레이어, UI 컴포넌트, 테스트를 분리해서." Claude: # 3개의 커밋을 생성했습니다: feat(api): add profile update endpoint handler feat(ui): add ProfileEditPage with form validation test: add unit tests for profile edit feature
5

PR 설명 생성Generate PR Description

PR을 만들고 리뷰어를 위한 설명을 자동으로 작성합니다.Create the PR and automatically write a description for reviewers.

Step 5: PR 생성Step 5: Create PR
You: "PR 만들어줘. 리뷰어가 이해하기 쉽게 설명도 써줘." Claude: # PR #142를 생성했습니다. # 제목: feat: 사용자 프로필 수정 기능 추가 # 본문에 변경 요약, 스크린샷 위치, 테스트 계획을 포함했습니다.
6

리뷰 및 머지Review and Merge

리뷰 피드백을 받아 수정하고, 최종 머지합니다.Address review feedback, make modifications, and finalize the merge.

Step 6: 리뷰 반영Step 6: Address Review
You: "PR에 리뷰 코멘트가 달렸어. 확인하고 수정해줘." Claude: # PR #142의 리뷰 코멘트 3개를 확인했습니다. # 1. 에러 핸들링 개선 → 수정 완료 # 2. 변수명 개선 제안 → 수정 완료 # 3. 엣지케이스 테스트 추가 → 추가 완료 fix: address PR review feedback
09

PR 리뷰 자동화Automated PR Review

Claude Code를 CLI 파이프라인에 연결하면 PR 리뷰를 자동화할 수 있습니다. 사람 리뷰 전에 기본 검토를 끝내세요.Connecting Claude Code to a CLI pipeline allows you to automate PR reviews. Finish the basic review before human review.

CLI 파이프라인으로 PR 리뷰
# 특정 PR의 diff를 Claude에게 리뷰 요청 gh pr diff 142 | claude -p "이 PR을 리뷰해줘. 버그 위험, 성능 이슈, 코드 스타일 문제를 중심으로." # 전체 PR 정보를 포함해서 리뷰 gh pr view 142 --json title,body,files | claude -p "이 PR의 변경사항을 분석하고 리뷰 코멘트를 작성해줘."
GitHub Actions에서 자동 리뷰 설정
# .github/workflows/claude-review.yml name: Claude PR Review on: pull_request: types: [opened, synchronize] jobs: review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Claude Code Review run: | gh pr diff ${{ github.event.number }} | \ claude -p "이 변경사항을 리뷰하고 개선 제안을 GitHub 코멘트 형식으로 작성해줘" | \ gh pr comment ${{ github.event.number }} -F -
💡
CI/CD 자동화 팁: GitHub Actions에 Claude 리뷰를 추가하면, PR이 올라올 때마다 자동으로 1차 리뷰가 달립니다. 사람 리뷰어는 Claude가 놓친 비즈니스 로직과 설계 의도만 집중하면 되니, 리뷰 시간이 크게 줄어듭니다. 단, Claude의 리뷰를 맹신하지 말고 참고용으로 활용하세요.CI/CD automation tip: Adding Claude review to GitHub Actions automatically attaches a first-pass review whenever a PR is opened. Human reviewers can focus only on business logic and design intent that Claude missed, greatly reducing review time. However, don't blindly trust Claude's review — use it as a reference.
10

버그 디버깅 패턴Bug Debugging Patterns

에러가 발생했을 때 Claude Code와 함께 체계적으로 디버깅하는 패턴입니다.Patterns for systematic debugging with Claude Code when errors occur.

1

에러 메시지 전달Pass Error Message

에러 로그, 스택 트레이스, 재현 조건을 Claude에게 전달합니다.Pass error logs, stack traces, and reproduction conditions to Claude.

2

분석Analysis

Claude가 관련 코드를 읽고, 에러 원인을 추론합니다.Claude reads related code and infers the cause of the error.

3

원인 파악Identify Root Cause

가능한 원인을 우선순위별로 정리하고 가장 유력한 원인을 특정합니다.Organizes possible causes by priority and identifies the most likely cause.

4

수정Fix

코드를 수정하고, 사이드 이펙트가 없는지 확인합니다.Modifies the code and checks for side effects.

5

검증Verify

테스트를 실행하고, 버그가 재현되지 않는지 확인합니다.Runs tests and confirms the bug is no longer reproducible.

❌ 사람이 혼자 디버깅❌ Debugging alone
1. 에러 메시지 구글링 2. Stack Overflow 답변 5개 읽기 3. 비슷한 이슈 찾아서 시도 4. 안 되면 다른 방법 시도 5. 30분~2시간 소요 "아 이거 왜 안 되지..."1. Google the error message 2. Read 5 Stack Overflow answers 3. Find similar issue and try 4. If that fails, try another approach 5. 30 min~2 hours "Why isn't this working..."
✅ Claude와 디버깅✅ Debugging with Claude
1. 에러 메시지 붙여넣기 2. Claude가 코드 분석 3. 원인 3가지 제시 4. 가장 유력한 것 바로 수정 5. 5~15분 소요 "원인 찾았습니다. 수정할까요?"1. Paste the error message 2. Claude analyzes the code 3. Presents 3 possible causes 4. Fixes the most likely one immediately 5. 5~15 minutes "Found the cause. Shall I fix it?"

디버깅 프롬프트 예시Debugging Prompt Examples

디버깅 프롬프트 1: 에러 메시지 기반Debug Prompt 1: Based on Error Message
You: "이 에러가 나와: TypeError: Cannot read properties of undefined (reading 'map') at UserList.tsx:24 이 파일을 확인하고 원인과 해결 방법을 알려줘."
디버깅 프롬프트 2: 동작 불일치Debug Prompt 2: Behavior Mismatch
You: "로그인 후 대시보드로 리다이렉트되어야 하는데 홈 페이지로 가버려. 관련 코드를 찾아서 원인을 분석해줘."
디버깅 프롬프트 3: 성능 이슈Debug Prompt 3: Performance Issue
You: "리스트 페이지가 아이템 100개 넘으면 엄청 느려져. 렌더링 성능을 분석하고 최적화 방안을 제시해줘. 가능하면 바로 수정도 해줘."
11

리팩토링 패턴Refactoring Patterns

리팩토링은 "동작은 바꾸지 않으면서 코드 구조를 개선하는 것"입니다. Claude Code와 함께하면 안전하게 할 수 있습니다.Refactoring is "improving code structure without changing behavior." With Claude Code, you can do it safely.

1

테스트 먼저 확인Check Tests First

리팩토링 전에 기존 테스트가 모두 통과하는지 확인합니다. 테스트가 없다면 먼저 작성합니다.Before refactoring, verify all existing tests pass. If there are no tests, write them first.

테스트 확인Check Tests
You: "UserService.ts를 리팩토링하고 싶어. 먼저 기존 테스트 상태를 확인하고, 테스트가 부족하면 추가해줘."
2

리팩토링 실행Execute Refactoring

구체적인 리팩토링 방향을 지정하고 Claude에게 실행을 맡깁니다.Specify the concrete refactoring direction and let Claude execute it.

리팩토링 실행Execute Refactoring
You: "UserService.ts를 리팩토링해줘. - 300줄짜리 함수를 작은 함수로 분리 - 중복 코드 제거 - 에러 핸들링 일관성 있게 정리 - 기존 동작은 절대 변경하지 마."
3

테스트 재실행Re-run Tests

리팩토링 후 모든 테스트가 여전히 통과하는지 확인합니다.After refactoring, verify all tests still pass.

테스트 재실행Re-run Tests
You: "리팩토링 끝났으면 테스트 전부 돌려봐. 하나라도 실패하면 원인 찾아서 수정해줘." Claude: # 모든 테스트 통과 (24/24) # 리팩토링 전후 동작이 동일합니다.
❌ 위험한 리팩토링❌ Dangerous Refactoring
1. 테스트 없이 바로 코드 수정 2. 여러 파일을 한꺼번에 변경 3. "아마 될 거야" 마인드 4. 배포 후 버그 발견 5. 롤백 지옥 "리팩토링했더니 프로덕션 터졌다"1. Modify code directly without tests 2. Change multiple files at once 3. "It'll probably work" mindset 4. Discover bugs after deployment 5. Rollback hell "Refactoring broke production"
✅ 안전한 리팩토링 (Claude와 함께)✅ Safe Refactoring (with Claude)
1. 테스트 커버리지 먼저 확보 2. 작은 단위로 점진적 변경 3. 매 단계마다 테스트 실행 4. Claude가 사이드 이펙트 체크 5. 안전하게 완료 "테스트 전부 통과. 안심하고 머지"1. Secure test coverage first 2. Incremental changes in small units 3. Run tests after each step 4. Claude checks side effects 5. Completed safely "All tests pass. Merge with confidence"
리팩토링 프롬프트 모음Refactoring Prompt Collection
# 함수 분리 You: "이 파일에서 100줄 넘는 함수를 찾아서 작은 함수로 분리해줘." # 디자인 패턴 적용 You: "이 switch-case 로직을 Strategy 패턴으로 바꿔줘." # 타입 안전성 강화 You: "이 파일의 any 타입을 모두 적절한 타입으로 교체해줘." # 중복 코드 제거 You: "src/ 폴더에서 중복되는 코드 패턴을 찾아서 공통 유틸로 추출해줘."
12

실전 시나리오 Before/AfterReal Scenarios: Before/After

실제 개발 현장에서 흔히 만나는 3가지 시나리오를 수동 vs Claude Code로 비교합니다.Comparing 3 scenarios commonly encountered in real development: Manual vs Claude Code.

Scenario 1 레거시 코드 현대화Legacy Code Modernization

❌ 수동으로 진행❌ Manual approach
1. 레거시 코드 파악 (2~3일) 2. 마이그레이션 계획 수립 (1일) 3. 하나씩 수동 변환 (1~2주) 4. 빠뜨린 부분 발견 → 다시 수정 5. 테스트 깨짐 → 하나씩 수정 총 소요: 2~3주 스트레스: 💢💢💢💢💢1. Understand legacy code (2~3 days) 2. Create migration plan (1 day) 3. Manual conversion one by one (1~2 weeks) 4. Discover missed parts → fix again 5. Tests broken → fix one by one Total: 2~3 weeks Stress: 💢💢💢💢💢
✅ Claude Code로 진행✅ With Claude Code
"이 프로젝트의 Class 컴포넌트를 전부 함수형 컴포넌트로 변환해줘. useState, useEffect 사용하고 테스트도 같이 업데이트해." 총 소요: 1~2일 스트레스: ☕ (커피 한 잔)"Convert all Class components in this project to functional components. Use useState, useEffect and update the tests too." Total: 1~2 days Stress: ☕ (one cup of coffee)

Scenario 2 API 엔드포인트 추가Adding API Endpoint

❌ 수동으로 진행❌ Manual approach
1. 라우터 파일 열기 2. 컨트롤러 작성 3. 서비스 레이어 작성 4. DTO / 유효성 검사 추가 5. 에러 핸들링 작성 6. Swagger 문서 업데이트 7. 테스트 작성 8. 통합 테스트 확인 총 소요: 3~4시간 반복 작업이 80%1. Open router file 2. Write controller 3. Write service layer 4. Add DTO / validation 5. Write error handling 6. Update Swagger docs 7. Write tests 8. Verify integration tests Total: 3~4 hours 80% repetitive work
✅ Claude Code로 진행✅ With Claude Code
"GET /api/users/:id/orders 엔드포인트를 추가해줘. - 기존 패턴을 따라서 - 페이지네이션 포함 - DTO, 유효성 검사, 에러 핸들링 - Swagger 문서 - 테스트까지 전부" 총 소요: 15~30분 Claude가 기존 패턴을 분석해서 일관성 유지"Add a GET /api/users/:id/orders endpoint. - Following existing patterns - Include pagination - DTO, validation, error handling - Swagger docs - Tests too, all of it" Total: 15~30 min Claude analyzes existing patterns for consistency

Scenario 3 버그 긴급 수정 (Hotfix)Emergency Bug Fix (Hotfix)

❌ 수동으로 진행❌ Manual approach
1. 에러 로그 확인 (Sentry/DataDog) 2. 관련 코드 찾기 (grep, 로그 추적) 3. 원인 추론 → 재현 시도 4. 수정 코드 작성 5. 테스트 → 커밋 → 배포 6. 모니터링 총 소요: 1~3시간 (심야 장애면 멘탈도 같이 수정 필요)1. Check error logs (Sentry/DataDog) 2. Find related code (grep, log trace) 3. Infer cause → try to reproduce 4. Write fix code 5. Test → commit → deploy 6. Monitor Total: 1~3 hours (Late-night incidents require mental repairs too)
✅ Claude Code로 진행✅ With Claude Code
"프로덕션에서 이 에러가 나와: [에러 로그 붙여넣기] 원인 찾고, 수정하고, 테스트까지. hotfix 브랜치로 커밋해줘." 총 소요: 15~30분 Claude가 코드베이스를 빠르게 탐색해서 원인 특정"This error is appearing in production: [paste error log] Find the cause, fix it, and test. Commit to a hotfix branch." Total: 15~30 min Claude quickly explores the codebase to identify the cause
13

자주 묻는 질문Frequently Asked Questions

실전 워크플로우에서 자주 나오는 질문들Common questions about real-world workflows

Claude는 커밋 전에 반드시 사용자 확인을 요청합니다. 만약 이미 커밋이 된 경우라면, git revert로 안전하게 되돌릴 수 있습니다. "방금 커밋 되돌려줘"라고 말하면 Claude가 revert 커밋을 생성합니다. git reset --hard는 이력이 사라지므로, Claude도 기본적으로 revert를 권장합니다.Claude always requests user confirmation before committing. If a commit has already been made, you can safely revert it with git revert. Saying "revert that last commit" will have Claude create a revert commit. Since git reset --hard loses history, Claude recommends revert by default.
Claude는 git push --force에 대해 매우 신중합니다. 특히 main/master 브랜치에 대한 force push는 경고를 표시하고, 정말 필요한지 재확인합니다. feature 브랜치에서 rebase 후 force push가 필요한 경우에는 --force-with-lease를 사용해서 다른 사람의 커밋을 덮어쓰지 않도록 보호합니다.Claude is very cautious about git push --force. Especially for force pushes to main/master branches, it shows warnings and reconfirms if it's really necessary. When force pushing after a rebase on a feature branch, it uses --force-with-lease to protect against overwriting others' commits.
네, Claude Code는 모노레포를 잘 이해합니다. CLAUDE.md 파일을 각 패키지별로 배치하면 패키지별 규칙을 적용할 수 있습니다. 예를 들어, packages/web/CLAUDE.md에는 프론트엔드 규칙을, packages/api/CLAUDE.md에는 백엔드 규칙을 적을 수 있습니다. 커밋할 때도 패키지별로 분리해서 커밋하도록 요청할 수 있습니다.Yes, Claude Code understands monorepos well. Placing CLAUDE.md files per package allows package-specific rules. For example, packages/web/CLAUDE.md for frontend rules and packages/api/CLAUDE.md for backend rules. You can also request commits separated by package.
Claude가 생성하는 PR 설명의 기본 구조는 다음과 같습니다:

## Summary — 변경사항 요약 (1~3개 bullet point)
## Changes — 주요 변경 파일과 내용
## Test plan — 테스트 방법과 확인 사항

물론 "우리 팀 PR 템플릿에 맞춰줘"라고 하면, 프로젝트의 PR 템플릿을 읽고 그 형식에 맞춰서 작성합니다. CLAUDE.md에 PR 형식을 정의해두면 매번 일관된 형식으로 생성됩니다.
The default structure of PR descriptions generated by Claude is as follows:

## Summary — Changes summary (1~3 bullet points)
## Changes — Key changed files and content
## Test plan — How to test and what to verify

Of course, saying "match our team's PR template" will have Claude read the project's PR template and write accordingly. Defining the PR format in CLAUDE.md ensures consistent format every time.

워크플로우 정리Workflow Summary

Plan Mode = Shift+Tab 두 번 → 계획 확인 → 승인 후 실행
체크포인팅 = Esc+Esc로 즉시 되돌리기 (Git 없이도)
세션 관리 = --continue / --resume / --fork-session
병렬 작업 = Git Worktree로 독립 세션 실행
깊은 추론 = ultrathink 키워드로 추론 깊이 최대화
코드 정리 = /simplify (구현 후) / /batch (대규모 변경)
Plan Mode = Shift+Tab twice → Review plan → Execute after approval
Checkpointing = Instant undo with Esc+Esc (even without Git)
Session Mgmt = --continue / --resume / --fork-session
Parallel Work = Run independent sessions with Git Worktrees
Deep Reasoning = Maximize reasoning depth with ultrathink keyword
Code Cleanup = /simplify (after implementation) / /batch (large-scale changes)

핵심은 하나입니다 —
"Claude에게 맥락을 충분히 주고, 검증은 항상 하자"
The key is one thing —
"Give Claude sufficient context, and always verify"

이전: Skills 완전 가이드Prev: Complete Skills Guide 다음: 고급 기능Next: Advanced Features