스킬
NEWClaude가 자동으로 적용하는 SKILL.md 파일로 정의된 도메인 전문 지식
스킬이란?
스킬은 Claude에게 특정 작업 방법을 가르치는 YAML frontmatter가 포함된 SKILL.md 파일입니다. 스킬의 설명과 일치하는 질문을 하면 Claude가 자동으로 해당 스킬의 지시, 도구, 컨텍스트를 적용합니다.
자동 호출
Claude가 스킬이 관련 있을 때 감지하여 설명을 기반으로 자동 적용합니다
SKILL.md 형식
메타데이터를 위한 YAML frontmatter + 지시와 컨텍스트를 위한 마크다운 본문
핫 리로드
스킬이 수정되면 자동으로 리로드 — 세션 재시작 필요 없음
스킬이 위치하는 곳
| 위치 | 경로 | 적용 대상 |
|---|---|---|
| Enterprise | Managed Settings | All users in organization |
| Personal | ~/.claude/skills/ | You, across all projects |
| Project | .claude/skills/ | Anyone in this repository |
| Plugin | skills/ in plugin | Anyone with plugin installed |
우선순위: Enterprise > Personal > Project > Plugin (이름 충돌 시 높은 것이 우선)
SKILL.md 구조
간단한 스킬
---
name: explaining-code
description: Explains code with visual diagrams and analogies. Use when explaining how code works.
---
When explaining code, always include:
1. **Start with an analogy**: Compare the code to something from everyday life
2. **Draw a diagram**: Use ASCII art to show the flow
3. **Walk through the code**: Explain step-by-step what happens
4. **Highlight a gotcha**: What's a common mistake?전체 Frontmatter가 포함된 고급 스킬
---
name: pdf-processing
description: Extract text, fill forms, merge PDFs. Use when working with PDF files.
allowed-tools: Read, Bash(python:*)
model: claude-opus-4-5-20251101
context: fork
---
# PDF Processing
## Quick start
Extract text:
```python
import pdfplumber
with pdfplumber.open("doc.pdf") as pdf:
text = pdf.pages[0].extract_text()
```
For form filling, see [FORMS.md](FORMS.md).Frontmatter 필드
| Field | Required | Description |
|---|---|---|
| name | Yes | Lowercase letters, numbers, hyphens (max 64 chars) |
| description | Yes | What it does and when to use (max 1024 chars) |
| allowed-tools | No | Restrict tools Claude can use (e.g., Read, Grep, Bash) |
| model | No | Override model (e.g., claude-opus-4-5-20251101) |
| context | No | Set to "fork" for isolated sub-agent context |
| agent | No | Agent type when context: fork (Explore, Plan, etc.) |
| hooks | No | Define PreToolUse, PostToolUse, Stop handlers |
| user-invocable | No | Show in slash menu (default: true) |
훅이 있는 스킬
스킬은 스킬의 라이프사이클 동안 실행되는 훅을 정의할 수 있습니다. 훅은 스킬에 범위가 지정되며 완료되면 자동으로 정리됩니다.
예시: 보안 검사 훅
---
name: secure-operations
description: Perform operations with additional security checks
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/security-check.sh $TOOL_INPUT"
once: true
---
Security-first operations with automatic validation.스킬 vs 다른 옵션
| Use This | When You Want To... | When It Runs |
|---|---|---|
| Skills | Give Claude specialized knowledge | Claude chooses when relevant |
| Slash Commands | Create reusable prompts | You type /command |
| CLAUDE.md | Set project-wide instructions | Loaded every conversation |
| Subagents | Delegate to separate context | Claude delegates or explicit |
| Hooks | Run scripts on events | On specific tool events |
| MCP Servers | Connect to external tools | Claude calls as needed |
멀티 파일 스킬 (점진적 공개)
복잡한 스킬의 경우 SKILL.md에 필수 정보를 넣고 상세 문서는 별도 파일에 넣으세요. Claude가 필요할 때만 지원 파일을 읽어 컨텍스트를 가볍게 유지합니다.
pdf-processing/
├── SKILL.md # Overview and navigation
├── FORMS.md # Loaded when needed
├── REFERENCE.md # Loaded when needed
└── scripts/
├── fill_form.py # Executed, not loaded
└── validate.py
Tip: SKILL.md는 500줄 미만으로 유지하세요. 스킬 디렉토리의 스크립트는 컨텍스트에 로드하지 않고 실행할 수 있습니다.
스킬 테스트하기
사용 가능한 스킬 보기
What Skills are available?스킬 테스트하기
스킬 설명과 일치하는 질문을 하거나, /skill-name으로 직접 호출하세요:
How does this code work?