Creating Skills
Build your own custom skills for Claude Code Setup.
Skill Types
| Type | How it loads | Example |
|---|---|---|
| Context | Auto-loads based on tech stack | Coding standards |
| Command | User invokes with /skill-name | Presentation creator |
Using /skill-creator
The easiest way to create a skill:
/skill-creatorClaude will ask:
- What type of skill?
- What should it do?
- What tech stacks should trigger it?
Manual Creation
Directory Structure
~/.claude/custom/skills/
└── my-skill/
└── SKILL.mdSKILL.md Format
---
name: my-skill
description: What this skill does
type: context
applies_to: [python, fastapi]
file_extensions: [".py"]
---
# Skill Content
Instructions and standards here...Context Skill Example
---
name: api-standards
description: REST API design standards
type: context
applies_to: [python, typescript, nodejs, fastapi, express]
file_extensions: [".py", ".ts"]
---
# API Design Standards
## Endpoints
- Use nouns, not verbs: `/users` not `/getUsers`
- Use plural nouns: `/users` not `/user`
- Nest resources: `/users/{id}/orders`
## HTTP Methods
| Method | Purpose | Response |
|--------|---------|----------|
| GET | Read | 200 + data |
| POST | Create | 201 + created resource |
| PUT | Replace | 200 + updated resource |
| PATCH | Update | 200 + updated resource |
| DELETE | Delete | 204 no content |
## Error Responses
\`\`\`json
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable message",
"details": [...]
}
}
\`\`\`Command Skill Example
---
name: create-api-spec
description: Create OpenAPI specification
type: command
---
# Create API Spec
When invoked, create an OpenAPI 3.0 specification:
1. Analyze existing routes in the codebase
2. Generate openapi.yaml with:
- Info section with project details
- All endpoints with parameters
- Request/response schemas
- Error responses
3. Save to docs/openapi.yamlFrontmatter Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Skill identifier (kebab-case) |
description | Yes | What the skill does (single-line) |
type | Yes | context or command |
applies_to | Context only | Tech stack triggers |
file_extensions | Context only | File extensions for task-based loading (e.g., [".py"]) |
Optional Files
Beyond SKILL.md, skills can include additional files:
my-skill/
├── SKILL.md # Required — skill definition
├── deps.json # System dependencies to install
├── assets/ # Templates, reusable content
├── references/ # Reference docs Claude can read
└── test-project/ # Example project for testingdeps.json
Declares system dependencies that the installer handles per platform:
{
"dependencies": [
{
"name": "yt-dlp",
"install": {
"macos": "brew install yt-dlp",
"debian": "apt-get install -y yt-dlp",
"arch": "pacman -S --noconfirm yt-dlp"
}
}
]
}references/
Markdown files that Claude reads alongside the SKILL.md. Useful for code review checklists, pattern libraries, or API references that would make the main SKILL.md too long.
assets/
Reusable content like templates. For example, create-slidev-presentation includes slide layout templates here.
test-project/
A working example project. standards-gradle includes a full Gradle project that demonstrates the conventions from the skill.
Overriding Built-in Skills
Put your skill in ~/.claude/custom/skills/ with the same name:
Built-in: ~/.claude/skills/standards-python/
Custom: ~/.claude/custom/skills/standards-python/
→ Custom winsRelated
- Customizing - Custom commands, scripts, MCP servers
- Customizing - Custom commands, scripts, MCP servers
- Auto-Loading Skills - How skills load