본문 바로가기
C.W.K.
Stream
Lesson 05 of 13 · published

슬래시 명령 — /init, /compact, /cost, /effort

~14 min · slash-commands, compact, cost, effort, model

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

모델에게 해석시킬 필요 없는 일은 슬래시 명령으로 처리해

슬래시 명령은 정해진 동작을 바로 실행해. 문맥을 줄이는 /compact, 비용을 보는 /cost, 추론 깊이를 고르는 /effort, 모델을 바꾸는 /model, 권한을 확인하는 /permissions, 프로젝트 문서를 만드는 /init 정도는 매일 손이 가게 돼. 전체 목록이 기억나지 않으면 /help를 열면 되고.

반복하는 지시도 직접 명령으로 만들 수 있어. .claude/commands/<name>.md에 Markdown을 두면 /name이 생기고, $ARGUMENTS에는 명령 뒤에 붙인 값이 들어가. 같은 검토 지시를 두 번 입력했다면 세 번째부터는 사용자 정의 명령 파일로 고정해. 2분이면 다음 세션에도 쓸 자산이 생겨.

직접 확인할 항목: .claude/commands/name.md, /effort low|medium|high|max.

Code

외워 둘 만한 슬래시 명령 여섯 개·bash
# Inside any Claude Code session:

/compact       # squeeze conversation history, save tokens
/cost          # show session $$$ spent and cache savings
/effort high   # dial up reasoning for the next message
/model opus    # switch model mid-session
/permissions   # inspect / edit allow-ask-deny rules
/init          # generate a CLAUDE.md from project state
/help          # full list with descriptions
나만의 /review 명령 만들기·markdown
# .claude/commands/review.md
Review the file at $ARGUMENTS for:

1. Logic bugs and edge cases
2. Security issues (SQL injection, XSS, auth bypass)
3. Performance concerns (N+1 queries, blocking I/O)
4. Style violations against our CLAUDE.md standards

Output a prioritized list with severity (HIGH/MEDIUM/LOW)
and file:line references.

External links

Exercise

매일 되풀이하는 작업 하나를 골라 사용자 정의 슬래시 명령으로 만들어. diff 검토, 로그 요약, 커밋 메시지 작성 같은 일이 좋아. .claude/commands/에 저장하고 실제 입력으로 실행한 다음, 지시문을 두 번 다듬어. 계속 쓸 가치가 생기면 커밋해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.