Create new Claude Code skills with proper structure. Use when user wants to add a skill, create a slash command, or automate a workflow. Fetches official docs and guides through skill creation.
Create properly structured Claude Code skills from user requirements.
For rapid creation, user can provide all info at once:
/add-skill name=my-skill purpose="Does X" trigger="when user asks for Y"
Parse and generate without interactive prompts.
Always fetch official docs first to ensure compliance with current spec:
WebFetch: https://code.claude.com/docs/en/skills
Prompt: Extract skill file format, required fields, naming rules, and best practices
If WebFetch fails, fallback:
WebSearch: "Claude Code skills SKILL.md format site:code.claude.com"
Ask user (or parse from quick mode):
~/.claude/skills/{skill-name}/ (available in all projects).claude/skills/{skill-name}/ (only this repo, committed with code)processing-pdfs, testing-code){base-path}/skills/{skill-name}/
āāā SKILL.md # Required: Main instructions (<500 lines)
āāā scripts/ # Optional: Executable code
ā āāā main.py
āāā references/ # Optional: Detailed docs (one level deep)
āāā examples.md
---
name: {skill-name}
description: {What it does in third person}. Use when {trigger conditions}.
---
# {Skill Title}
{Brief overview - assume Claude is smart, only add context it doesn't already have}
## Quick Start
{Minimal working example or first step}
## Instructions
{Step-by-step guidance with appropriate freedom level}
## Advanced Features
**Feature A**: See [references/feature-a.md](references/feature-a.md)
After drafting SKILL.md, count its lines. If approaching or exceeding 500 lines:
references/{topic}.md ā one level deep onlyRun through the validation checklist before finalizing.
ls -la ~/.claude/skills/{skill-name}/
cat ~/.claude/skills/{skill-name}/SKILL.md
Test with: claude --debug to check for loading errors.
processing-pdfs, testing-code, writing-documentationpdf-processing, process-pdfs-, consecutive --, reserved words (anthropic, claude), XML tagshelper, utils, tools), overly generic (documents, data)Good:
description: Extracts text and tables from PDF files, fills forms, merges documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
Bad: "Helps with documents", "Processes data", "Does stuff with files"
Challenge each piece of information:
| Freedom | Use When | Example |
|---|---|---|
| High (text instructions) | Multiple valid approaches | Code review guidelines |
| Medium (pseudocode/params) | Preferred pattern exists | Report generation template |
| Low (exact scripts) | Fragile operations, consistency critical | Database migrations |
Pick one term and use it throughout. Don't mix "API endpoint" / "URL" / "API route".
For complex multi-step operations, provide a copyable checklist.
Run validator ā fix errors ā repeat until passing.
Guide through decision points: Creating new? ā "Creation workflow" / Editing existing? ā "Editing workflow"
script.py" (execute) vs "See script.py" (reference)ServerName:tool_name<details> tag for old patterns