# Claude Code 스킬 가이드 (SKILL.md)

> **최종 검증**: 2026-10-20 · 📄 공식 문서 기준 (Claude Code Skills)

스킬은 `SKILL.md` 파일이에요. `---` 표시 사이의 YAML frontmatter가 Claude에게 언제 이 스킬을 사용할지 알려주고, 그 아래의 Markdown 지침을 Claude가 실행할 때 따르죠. Claude는 관련이 있을 때 스킬을 사용하고, `/skill-name`으로 직접 호출할 수도 있어요.

스킬은 Claude Code의 지식 계층 컴포넌트로, Claude에게 도메인별 전문 지식과 가이드를 제공해요. Claude는 관련이 있을 때 자동으로 로드하며, `/skill-name`으로 직접 호출할 수도 있어요.

## 스킬이란?

스킬은 `SKILL.md` 파일에 저장된 전문 지식 모듈이에요:

- **자동 활성화**: Claude가 작업 맥락에 따라 관련 스킬을 자동으로 사용해요

- **도메인 지식**: 특정 도메인의 모범 사례와 가이드를 제공해요

- **확장 가능**: 특정 요구에 맞는 사용자 정의 스킬을 만들 수 있어요

- **맥락 인식**: 관련된 상황에서만 호출돼요

### 스킬 vs 명령 vs 에이전트

| 컴포넌트 | 트리거 | 목적 |
|-----------|---------|---------|
| **명령** | 사용자가 직접 호출 (`/command`) | 특정 작업 실행 |
| **스킬** | 자동 활성화 또는 `/skill-name` | 도메인 지식 제공 |
| **에이전트** | 위임 호출 | 복잡한 워크플로 처리 |

### 스킬, 명령, CLAUDE.md (2026-10-20 검증)

Claude Code 스킬은 여러 AI 도구에서 동작하는 Agent Skills 오픈 표준을 따라요. 사용자 정의 명령은 스킬로 통합되었어요. `.claude/commands/deploy.md` 파일과 `.claude/skills/deploy/SKILL.md` 스킬은 모두 `/deploy`를 만들고 동일하게 동작해요. `CLAUDE.md` 내용과 달리 스킬 본문은 사용될 때만 로드되므로, 긴 참고 자료도 필요할 때까지 거의 비용이 들지 않아요.

## 내장 스킬 사용하기

Claude Code 플러그인에는 보통 여러 내장 스킬이 포함되어 있어요. 작업이 스킬의 설명과 일치하면 Claude가 자동으로 사용해요.

Claude Code에는 `/doctor`, `/code-review`, `/batch`, `/debug`, `/loop`, `/claude-api` 같은 번들 스킬도 포함되어 있어요 (2026-10-20 검증). 번들 스킬은 다른 스킬과 같은 방식으로 호출해요. `/`를 입력한 뒤 스킬 이름을 쓰면 돼요.

### 예시: 코드 리뷰

"이 코드의 보안 문제를 검토해 줘"라고 말했을 때 보안 리뷰 스킬이 포함된 플러그인이 설치되어 있다면, Claude가 자동으로 해당 스킬의 지식을 적용해 리뷰해요.

### 사용 가능한 스킬 확인하기

스킬은 보통 플러그인과 함께 설치돼요:

```bash
# Install plugin (plugins may contain multiple Skills)
/plugin install plugin-name@marketplace
```

## 사용자 정의 스킬 만들기

### 기본 구조

가장 단순한 스킬은 `SKILL.md` 파일 하나만 있으면 돼요:

```bash
my-skill/
└── SKILL.md
```

### SKILL.md 형식

```markdown
---
name: Code Style Guide
description: Use this skill when the user asks about "code style", "naming conventions", "code formatting", or discusses coding standards
---

# Code Style Guide

## Naming Conventions

- Variables use camelCase
- Constants use UPPER_SNAKE_CASE
- Classes use PascalCase
- Private members use underscore prefix

## Formatting Rules

- Use 2 spaces for indentation
- Line width should not exceed 80 characters
- Use trailing commas

## Best Practices

- Functions should have single responsibility
- Avoid deep nesting
- Use meaningful variable names
```

### Frontmatter 필드

모든 필드는 선택 사항이에요. Claude가 언제 스킬을 사용할지 알 수 있도록 `description`만 권장하며, `name`은 생략할 수 있고 기본값은 디렉터리 이름이에요. 필드 이름은 하이픈을 포함해 공식 frontmatter 레퍼런스와 정확히 일치해야 해요 (아래 표는 일반적인 필드만 나열하며, 공식 문서에는 `model`, `effort`, `hooks`, `user-invocable` 등도 다뤄요). Claude Code는 인식하지 못하는 필드를 오류 없이 무시해요 (2026-10-20 검증).

| 필드 | 필수 | 설명 |
|-------|----------|-------------|
| `name` | 아니요 | `/` 메뉴에 표시되는 명령 이름이며, 기본값은 디렉터리 이름이에요 |
| `description` | 권장 | 스킬이 하는 일과 사용 시점이며, Claude는 이를 바탕으로 스킬 적용 시점을 결정해요 |
| `when_to_use` | 아니요 | 트리거 문구나 예시 요청처럼 Claude가 스킬을 호출해야 할 시점에 대한 추가 맥락이며, 스킬 목록에서 `description` 뒤에 덧붙여져요 |
| `argument-hint` | 아니요 | 자동 완성 중 예상 인자를 안내하는 힌트이며, `[issue-number]` 또는 `[filename] [format]` 같은 형식이에요 |
| `disable-model-invocation` | 아니요 | `true`로 설정하면 Claude가 이 스킬을 자동으로 로드하지 않아요. `/name`으로 직접 트리거하는 워크플로에 사용하세요 |
| `allowed-tools` | 아니요 | 이 스킬을 호출하는 턴 동안 Claude가 권한 요청 없이 사용할 수 있는 도구예요 |
| `paths` | 아니요 | 이 스킬이 활성화되는 시점을 제한하는 glob 패턴이며, 일치하는 파일을 다룰 때만 Claude가 자동으로 로드해요 |
| `context` | 아니요 | `fork`로 설정하면 포크된 서브에이전트 컨텍스트에서 실행해요 |

`version`은 이 표의 필드가 아니에요. Claude Code는 인식하지 못하는 필드를 오류 없이 무시해요 (2026-10-20 검증).

### 효과적인 설명 작성하기

description 필드는 스킬이 활성화되는 시점을 결정하며, 구체적인 트리거 문구를 포함해야 해요:

**좋은 예**:
```yaml
description: Use this skill when the user asks to "create a hook", "add a PreToolUse hook", "validate tool use", or mentions hook events
```

**나쁜 예**:
```yaml
description: Guide about hooks  # Too vague
```

## 전체 스킬 구조

복잡한 스킬에는 더 많은 리소스를 포함할 수 있어요:

```bash
my-skill/
├── SKILL.md           # Main knowledge document
├── references/        # Detailed references
│   ├── patterns.md    # Design patterns
│   └── advanced.md    # Advanced techniques
├── examples/          # Example code
│   ├── basic.ts       # Basic example
│   └── advanced.ts    # Advanced example
└── scripts/           # Helper scripts
    └── validate.sh    # Validation script
```

### 리소스 참조하기

SKILL.md에서 다른 리소스를 참조해요:

```markdown
---
name: API Development Guide
description: Use when the user asks about "API design", "REST interfaces", "API best practices"
---

# API Development Guide

See @references/patterns.md for detailed API design patterns

## Quick Example

See @examples/basic.ts for basic usage
```

### 동적 컨텍스트 주입

`` !`git diff HEAD` `` 같은 줄은 동적 컨텍스트 주입을 사용해요. Claude Code가 명령을 실행하고 Claude가 스킬 내용을 보기 전에 그 줄을 출력으로 바꾸므로, 지침이 현재 diff가 이미 인라인된 상태로 도착해요 (2026-10-20 검증).

### 스킬 로드 위치

- **개인 스킬**은 `~/.claude/skills/<skill-name>/SKILL.md`에 있어요.
- **프로젝트 스킬**은 저장소 안의 `.claude/skills/<skill-name>/SKILL.md`에 있어요.
- **플러그인 스킬**은 플러그인 안의 `<plugin>/skills/<skill-name>/SKILL.md`에 있어요.

## 플러그인에서 스킬 사용하기

### 디렉터리 구조

스킬은 플러그인의 `skills/` 디렉터리에 들어가요:

```bash
my-plugin/
├── .claude-plugin/
│   └── plugin.json
├── commands/          # Command layer
├── agents/            # Agent layer
└── skills/            # Knowledge layer
    ├── code-style/
    │   └── SKILL.md
    └── api-docs/
        ├── SKILL.md
        └── references/
```

### 명령에서 스킬 참조하기

명령은 스킬 지식을 명시적으로 참조할 수 있어요:

```markdown
---
description: Generate standards-compliant API documentation
argument-hint: [api-file]
---

Generate API documentation for @$1.

Use the api-docs skill to ensure documentation includes:
- Complete endpoint descriptions
- Parameter specifications
- Response formats
- Error codes
- Usage examples
```

## 실전 예시

### 예시 1: 프로젝트 표준 스킬

```markdown
---
name: Project Standards
description: Use when the user asks about "project structure", "file organization", "directory conventions"
---

# Project Standards

## Directory Structure

\`\`\`
src/
├── components/    # React components
├── hooks/         # Custom Hooks
├── services/      # API services
├── utils/         # Utility functions
└── types/         # TypeScript types
\`\`\`

## File Naming

- Components: PascalCase (e.g., `UserProfile.tsx`)
- Utilities: camelCase (e.g., `formatDate.ts`)
- Constants: UPPER_SNAKE_CASE (e.g., `API_ENDPOINTS.ts`)

## Import Order

1. React related
2. Third-party libraries
3. Internal modules
4. Type definitions
5. Style files
```

### 예시 2: Git 워크플로 스킬

```markdown
---
name: Git Workflow
description: Use when the user asks about "branch strategy", "commit conventions", "Git process"
---

# Git Workflow Standards

## Branch Naming

- Features: `feature/description`
- Fixes: `fix/description`
- Hotfixes: `hotfix/description`

## Commit Message Format

\`\`\`
<type>(<scope>): <subject>

<body>

<footer>
\`\`\`

### Type Values

- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation update
- `style`: Code formatting
- `refactor`: Refactoring
- `test`: Testing
- `chore`: Build/tooling
```

### 예시 3: 보안 리뷰 스킬

```markdown
---
name: Security Review
description: Use when the user asks about "security check", "vulnerability scan", "security best practices", or reviewing code security
---

# Security Review Guide

## Common Vulnerability Checks

### SQL Injection
- Check for parameterized queries
- Avoid string concatenation in SQL

### XSS Attacks
- Check if user input is escaped
- Use CSP headers

### Sensitive Data
- Ensure passwords are not stored in plaintext
- Don't hardcode API keys
- Check logs for sensitive data leaks

## Review Checklist

- [ ] Input validation
- [ ] Output encoding
- [ ] Authentication mechanism
- [ ] Authorization checks
- [ ] Encryption usage
- [ ] Error handling
```

## 모범 사례

### 1. 명확한 트리거 설명

모호한 설명 대신 구체적인 트리거 문구를 사용하세요:

```yaml
# Good
description: Use when the user asks about "create component", "React component template", "component best practices"

# Bad
description: React component related
```

### 2. 구조화된 지식

지식을 명확한 계층으로 정리하세요:

- 제목 수준을 사용하세요

- 코드 예시를 제공하세요

- 체크리스트를 포함하세요

### 3. 최신 상태 유지

- 스킬 내용을 정기적으로 업데이트하세요

- 버전 번호에 변경 사항을 반영하세요

- 중요한 업데이트를 문서화하세요

### 4. 모듈식 설계

- 각 스킬은 하나의 도메인에 집중해요

- 상세 자료는 references 디렉터리를 사용하세요

- 실용적인 예시를 제공하세요

## 디버깅 스킬

스킬이 예상대로 활성화되지 않는다면:

1. **description 확인**: 트리거 문구가 사용자 입력과 일치하는지 확인하세요

2. **형식 검증**: YAML frontmatter가 올바르게 작성되었는지 확인하세요

3. **트리거 테스트**: description에 있는 정확한 문구를 사용해 보세요

## 다음 단계

- [플러그인 시스템](/docs/advanced/plugins) - 전체 플러그인 개발 알아보기

- [MCP 서버](/docs/advanced/mcp) - Claude의 도구 기능 확장

- [CLI 팁](/docs/usage/cli-tips) - 명령줄 효율 높이기