Knowledges 10분

VB-05 “Commands & Hooks”로 생산성 끌어올리기!

Claude Code의 Commands & Hooks: 자주 쓰는 prompt를 / 명령으로 묶고, hook을 걸어 CC가 일 끝나면 Telegram으로 알려주거나 직접 말까지 하게 만들기. 제가 매일 쓰는 commands 전체 목록도 같이 드려요 😁

다른 언어: English · Tiếng Việt · 中文 · 日本語

“Claude Code로 Vibe Coding하기” 시리즈 05편입니다! 솔직히 이번 편은 제가 좀 게을러서, 자주 쓰는 commands & hooks만 쭉 정리해 볼게요 😅

(대신 글 마지막에 Claude Code 쓰는 분들께 꽤 유용한 repo 몇 개를 모아뒀으니 꼭 확인해 보세요!)

VB-05 “Commands & Hooks”로 생산성 끌어올리기!

Commands란?

미리 만들어 둔 prompt 템플릿을 빠르게 보내는 방법이에요.

CLAUDE.md나 agents/*.md 같은 “System Prompt”와 달리, commands는 “User Prompt”라서 “무게감”이 훨씬 크고 더 우선적으로 처리돼요.

예를 들어 작업하다 보면 계속 반복해서 써야 하는 prompt가 있잖아요. 이제 그걸 command 하나로 묶어서 /로 바로 불러낼 수 있어요.

Commands 만드는 법

아주 간단해요. ~/.claude/commands 폴더에 아래 구조로 Markdown 파일을 만들면 끝:

markdown---
description: 이 command에 대한 설명
---

여기에 prompt를 작성하세요

$ARGUMENTS

$ARGUMENTS는 command 뒤에 입력한 내용이 그 자리에 그대로 들어가는 부분이에요 (예: /fix 기본 언어 오류).

command의 scope는 2가지

Scope.md 파일 위치사용 범위
Project commands프로젝트의 .claude/commands해당 프로젝트에서만
Global commands~/.claude/commands어디서든!

Pro tip: Commands로 Subagents 소환하기

첫 번째 “Subagents” 글에서 “Commands”가 필요할 때 Subagents를 소환하는 가장 좋은 방법이라고 말씀드렸죠. 그래서 각 command 안에 자세하고 명확한 workflow를 만들어 두면, 원하는 대로 커스터마이즈하고 작업 유형마다 딱 맞게 쓸 수 있어요.

예시: fix-ci.md

markdown---
description: Github Actions의 실패한 테스트를 읽고, 분석하고, 디버그하고, 수정
---

Github Actions의 실패한 테스트를 읽고, 분석하고, 디버그하고, 수정해줘:

$ARGUMENTS

프로세스:
- "debugger" agent로 Github Actions logs를 읽고 분석
- "planner" agent로 수정 계획 수립
- "tester" agent로 수정 사항을 테스트해서 모든 test suite 통과 확인

제가 쓰는 commands 목록

이번 편은 좀 게으르기도 하고, “Commands”에 대해 더 할 말도 별로 없어서, 제가 Claude Code용으로 만든 command 목록만 공유할게요.

모든 command 파일은 이 repo에 올려뒀고, 제가 최적화해서 지금 쓰고 있는 Subagents 세팅 전체도 같이 있어요. 필요하신 분은 마음껏 가져다 쓰세요.

(피드백이나 개선 아이디어가 있으면 repo에 바로 contribute 해주세요!)

사실 저도 다른 사람 repo에서 “영감을 받은”(“베꼈다”의 고급스러운 표현) 거예요. 그중 Claude Code 쓰는 분들께 꽤 유용하다고 생각하는 repo가 https://github.com/mrgoonie/claude-code-setup — 한번 확인해 보세요!

Command용도직접 코드 수정?
/askcodebase, 아키텍처에 대해 뭐든 질문아니요
/planplanner-researcher로 상세 계획 수립아니요, 리포트만
/cookagent 팀 전체로 기능 구현 / 복잡한 버그 수정예
/fix자잘한 버그 빠르게 수정예
/fix-test로컬에서 테스트 돌리고 통과할 때까지 수정예
/fix-ciGithub Actions logs 읽고 수정 계획 수립먼저 확인 요청
/test로컬에서 테스트 돌리고 보고아니요
/refactor계획과 제약을 둔 리팩터링먼저 확인 요청
/debug버그의 근본 원인 찾기아니요
/watzup최근 변경 사항 요약아니요

/ask

codebase에 대해 뭐든 물어볼 때 쓰는 command예요.

/ask command 내용 보기
markdown---
description: Answer technical and architectural questions.
---
## Context
- Technical question or architecture challenge: $ARGUMENTS
- Relevant system documentation and design artifacts will be referenced using @ file syntax.
- Current system constraints, scale requirements, and business context will be considered.

## Your Role
You are a Senior Systems Architect providing expert consultation and architectural guidance. You focus on high-level design, strategic decisions, and architectural patterns rather than implementation details. You orchestrate four specialized architectural advisors:
1. **Systems Designer** – evaluates system boundaries, interfaces, and component interactions.
2. **Technology Strategist** – recommends technology stacks, frameworks, and architectural patterns.
3. **Scalability Consultant** – assesses performance, reliability, and growth considerations.
4. **Risk Analyst** – identifies potential issues, trade-offs, and mitigation strategies.

## Process
1. **Problem Understanding**: Analyze the technical question and gather architectural context.
2. **Expert Consultation**:
   - Systems Designer: Define system boundaries, data flows, and component relationships
   - Technology Strategist: Evaluate technology choices, patterns, and industry best practices
   - Scalability Consultant: Assess non-functional requirements and scalability implications
   - Risk Analyst: Identify architectural risks, dependencies, and decision trade-offs
3. **Architecture Synthesis**: Combine insights to provide comprehensive architectural guidance.
4. **Strategic Validation**: Ensure recommendations align with business goals and technical constraints.

## Output Format
1. **Architecture Analysis** – comprehensive breakdown of the technical challenge and context.
2. **Design Recommendations** – high-level architectural solutions with rationale and alternatives.
3. **Technology Guidance** – strategic technology choices with pros/cons analysis.
4. **Implementation Strategy** – phased approach and architectural decision framework.
5. **Next Actions** – strategic next steps, proof-of-concepts, and architectural validation points.

## Important
This command focuses on architectural consultation and strategic guidance. Do not start implementing anything.

/plan

“planner-researcher” subagent를 소환해서 기능 구현이나 복잡한 버그 수정을 위한 상세 계획을 세워요. REPORT만, 실행은 NO.

markdown---
description: Research, analyze, and create implementation plans
---
Use the `planner-researcher` subagent to plan for this task: 
 $ARGUMENTS

REMEMBER: **Do not** start implementing.

/cook

제 system prompt에는 이미 subagents 워크플로의 핵심 3요소가 들어 있어요: Core Responsibilities, Subagents Team, Development Rules. agent 팀 전체가 투입돼야 하는 기능 구현이나 복잡한 버그 수정이 필요할 때 이 command를 불러요.

잠긴 섹션: /fix

잠긴 섹션: /fix-test

잠긴 섹션: /fix-ci

잠긴 섹션: /test

잠긴 섹션: /refactor

잠긴 섹션: /debug

잠긴 섹션: /watzup

잠긴 섹션: Hooks — 뭐고, 어디에 쓰나?

잠긴 섹션: 1. UserPromptSubmit

잠긴 섹션: 2. PreToolUse

잠긴 섹션: 3. PostToolUse

잠긴 섹션: 4. Notification

잠긴 섹션: 5. Stop

잠긴 섹션: 6. SubagentStop

잠긴 섹션: 7. PreCompact

잠긴 섹션: 8. SessionStart

잠긴 섹션: Case 1: 작업 끝나면 Telegram으로 알림 받기

잠긴 섹션: Case 2: TTS + Hook = 음성 비서!

잠긴 섹션: 필살기: “적의 무기로 적을 친다”

잠긴 섹션: 꼼수 타임!

잠긴 섹션: 추가 참고 자료

잠긴 섹션: 끝!

나머지는 Knowledges 회원 전용입니다

회원 전용 섹션 22개 더(약 6분)

현재 앞부분 약 3분의 1을 읽고 있습니다. Knowledges, 콤보, 커뮤니티 플랜은 유료 글 전체를 열고, Zuey AI 플랜은 미리보기만 읽습니다.