[Claude Code 스킬] 스킬 호출 제어 — /deploy를 Claude가 스스로 못 부르게 잠그기 | DAKER 커뮤니티

Claude Code에서 스킬(SKILL.md)은 기본적으로 문이 두 개 열려 있습니다. 내가 /이름으로 직접 여는 문, 그리고 Claude가 상황을 보고 알아서 여는 문. 호출 제어는 프론트매터 한 줄로 이 문을 각각 잠그는 기능입니다.

무엇

스킬은 폴더 하나와 SKILL.md 한 장으로 만드는 절차서입니다. 커스텀 커맨드(.claude/commands/deploy.md)도 이제 스킬로 통합되어 .claude/skills/deploy/SKILL.md와 똑같이 /deploy를 만듭니다. 여기서 프론트매터 두 필드가 호출 주체를 나눕니다. disable-model-invocation: true는 Claude의 자동 로드를 막고 사람만 부르게 하며, user-invocable: false는 반대로 / 메뉴에서 숨겨 Claude만 쓰게 합니다. 실행 위치를 바꾸는 context: fork, 그 턴에만 도구 승인을 미리 해두는 allowed-tools까지 합치면 "누가 부르고, 어디서 돌고, 무엇을 쥐는가"가 전부 파일 안에서 결정됩니다.

언제 쓰나

사용법

1) 사람만 부를 수 있는 배포 스킬. 포크 실행까지 함께 걸어 메인 대화를 보호합니다.

# .claude/skills/deploy/SKILL.md
---
name: deploy
description: Deploy the application to production
context: fork
disable-model-invocation: true
---

Deploy the application:
1. Run the test suite
2. Build the application
3. Push to the deployment target

2) 격리된 조사 스킬. 스킬 본문 자체가 서브에이전트의 프롬프트가 되고, 대화 기록은 넘어가지 않습니다.

# .claude/skills/research/SKILL.md
---
name: research
description: Research a topic across the codebase
context: fork
agent: Explore
---

Research $ARGUMENTS thoroughly:
1. Find relevant files using Glob and Grep
2. Read and analyze the code
3. Summarize findings with specific file references

호출은 /research 인증 흐름처럼 인자를 붙이면 됩니다. $ARGUMENTS는 전체 인자, $ARGUMENTS[0]은 0번째 인자(축약형 $0)입니다.

3) 실행 전에 셸 출력을 본문에 미리 박아 넣는 동적 컨텍스트 + 턴 한정 승인.

# .claude/skills/pr-summary/SKILL.md
---
name: pr-summary
description: Summarize changes in a pull request
context: fork
agent: Explore
allowed-tools: Bash(gh *)
---

## Pull request context
- PR diff: !`gh pr diff`
- PR comments: !`gh pr view --comments`
- Changed files: !`gh pr diff --name-only`

백틱 앞의 ! 구문은 Claude가 실행하는 명령이 아니라 전처리입니다. 명령이 먼저 돌고, 그 출력이 자리표시자를 대체한 뒤에야 Claude가 완성된 프롬프트를 봅니다. 치환은 원본 파일을 한 번만 훑기 때문에 명령 출력 안의 !`...`는 다시 실행되지 않습니다.

출처

Redirecting to [Claude Code 스킬] 스킬 호출 제어 — /deploy를 Claude가 스스로 못 부르게 잠그기 | DAKER 커뮤니티...