npx skills add ...
npx skills add dboeckli/ai-agent-skills --skill skill-best-practices
Guide for creating, structuring, and improving Claude skills (SKILL.md). Use when building a new skill, reviewing an existing skill, writing SKILL.md frontmatter, defining trigger conditions, troubleshooting skill problems (not triggering, over-triggering, instructions not followed), or planning skill distribution. When working on any skill in this repository: also load the cc-best-practices skill, and always update both CLAUDE.md and README.md skill tables after any skill change. Do NOT use for general Claude Code configuration or hook setup.
npx skills add dboeckli/ai-agent-skills --skill skill-best-practices
Reference: https://resources.anthropic.com/hubfs/The-Complete-Guide-to-Building-Skill-for-Claude.pdf
Determine which type of skill you're building:
Define 2–3 concrete use cases before writing anything (see Planning section below).
my-skill-name)SKILL.md (case-sensitive) inside itname and description (see Technical requirements)The description controls when Claude loads your skill. It must include:
See "Writing effective descriptions" for good/bad examples.
Follow the recommended template: ## Instructions → numbered steps → ## Examples → ## Troubleshooting.
Be specific and actionable. Move detailed docs to references/ and link to them.
After creating or modifying any skill in this repository, always update the skill tables in both files:
CLAUDE.md — skill table under "Included Skills" (Trigger column: one-line description of when it fires)README.md — skill table under "Enthaltene Skills" (Beschreibung column: German one-liner)Both files must stay in sync. This step is mandatory and must not be skipped.
Also invoke the cc-best-practices skill when working on skills in this repository to ensure context and session management follow project standards.
Run the validation script from the repository root before testing or committing:
Fix any FAIL lines before continuing. Common issues:
description uses block scalar (> or |) → replace with a quoted single-line stringAfter pushing, also run the remote check to confirm npx skills add --list finds all skills:
Run 10–20 test queries. Target: skill triggers on ~90% of relevant queries and never on unrelated topics. Iterate on the description until triggering is reliable (see Testing approach).
User says: "Help me create a skill that plans sprints in Linear"
Actions:
linear-sprint-planner/SKILL.mdResult: Functional skill that auto-triggers on sprint planning requests and executes the full workflow without user re-explaining the steps each time.
User says: "Review my SKILL.md and suggest improvements"
Actions:
Result: Prioritized list of improvements with specific fixes for each issue.
User says: "My skill never loads automatically, I always have to invoke it manually"
Actions:
Result: Updated description with concrete triggers; skill auto-loads on relevant queries.
A skill is a folder containing:
SKILL.md (required): Instructions in Markdown with YAML frontmatterscripts/ (optional): Executable code (Python, Bash, etc.)references/ (optional): Documentation loaded as neededassets/ (optional): Templates, fonts, icons used in outputProgressive Disclosure — three levels:
references/: loaded on demandComposability — skills work alongside others; don't assume exclusivity.
Portability — works identically across Claude.ai, Claude Code, and API.
Before writing, define 2–3 concrete use cases:
Ask yourself:
| Category | When to use | Key techniques |
|---|---|---|
| Document & Asset Creation | Consistent, high-quality output (docs, designs, code) | Style guides, templates, quality checklists |
| Workflow Automation | Multi-step processes with consistent methodology | Step-by-step with validation gates, iterative loops |
| MCP Enhancement | Workflow guidance on top of MCP tool access | Sequential MCP calls, embedded domain expertise |
notion-project-setup) — no spaces, underscores, or capitalsSKILL.md (case-sensitive) — no variationsREADME.md inside the skill folder (put docs in SKILL.md or references/)Minimal required format:
name (required):
description (required):
< or >)Optional fields:
Security restrictions — forbidden in frontmatter:
< >)Structure: [What it does] + [When to use it] + [Key capabilities]
Good examples:
Bad examples:
Recommended structure:
Be specific and actionable:
Include error handling — document common errors with cause and solution.
Reference bundled resources clearly:
Use progressive disclosure — keep SKILL.md focused on core instructions; move detailed docs to references/ and link to them. Keep SKILL.md under 5,000 words.
For critical validations, prefer a bundled script over language instructions — code is deterministic, language interpretation isn't.
Run 10–20 queries. Skill should trigger on ~90% of relevant queries and NOT trigger on unrelated topics.
Debugging: Ask Claude "When would you use the [skill name] skill?" — it will quote the description back.
Compare token count, tool calls, and back-and-forth messages with vs. without the skill.
Pro tip: Iterate on a single challenging task until Claude succeeds, then extract the winning approach into a skill.
| Error | Cause | Fix |
|---|---|---|
| "Could not find SKILL.md" | Wrong filename | Rename exactly to SKILL.md |
| "Invalid frontmatter" | YAML formatting | Add --- delimiters, close quotes |
| "Invalid skill name" | Spaces or capitals in name | Use kebab-case |
Fix: Add more specific keywords and phrases to the description.
Add negative triggers and narrow the scope:
references/## Critical headersreferences/Five patterns cover most skill types: Sequential orchestration, Multi-MCP coordination, Iterative refinement, Context-aware tool selection, and Domain-specific intelligence.
For detailed examples and implementation templates for each pattern, consult references/patterns.md.
Before you start:
During development:
SKILL.md exists (exact spelling, case-sensitive)--- delimitersname: kebab-case, no spaces, no capitalsdescription includes WHAT and WHEN< >) anywhereRepository sync (mandatory for this repo):
CLAUDE.md skill table updatedREADME.md skill table updatedcc-best-practices skill was loaded during this sessionvalidate-skills.sh run — no FAIL linesvalidate-skills.sh --remote run — all skills found by npx skillsBefore upload:
After upload: