This guide covers everything you need to author a high-quality skill for this repository — from file layout and frontmatter rules through description writing, body guidelines, and testing.
New here? Read docs/getting-started.md first to understand what skills are and how to install them before authoring your own.
- Skill structure
- Frontmatter schema
- Writing the description
- Writing the skill body
- Testing your skill
- Proposing a skill via a pull request
Each skill lives in its own folder under skills/:
skills/
└── skill-name/
├── SKILL.md # Required — frontmatter + instructions
├── scripts/ # Optional — executable scripts the agent can run
├── references/ # Optional — supporting docs loaded on demand
├── assets/ # Optional — templates, icons, example files
└── evals/ # Optional — test prompts and assertions
Rule: the folder name must exactly match the
namefield in theSKILL.mdfrontmatter.
| Directory | Use for |
|---|---|
scripts/ |
Deterministic or repetitive logic better run as code than described in prose (e.g. a validation script, a formatter, a data transformer) |
references/ |
Domain docs, API specs, decision tables, or anything too large to keep in SKILL.md without exceeding 500 lines |
assets/ |
Template files, example inputs/outputs, icons — anything the skill produces or consumes |
evals/ |
Test prompts and assertions to verify skill behavior and trigger accuracy. See skill-testing.md |
Every SKILL.md must open with a YAML frontmatter block:
---
name: skill-name
description: >
What this skill does and the specific situations in which it should be
activated. Include trigger phrases, domains, and keywords.
license: Proprietary # optional
compatibility: GitHub Copilot # optional — only when env requirements exist
---| Field | Required | Constraints |
|---|---|---|
name |
✅ | Lowercase letters, numbers, and hyphens only. Max 64 chars. Must not start or end with a hyphen. No consecutive hyphens (--). Must match the parent directory name. |
description |
✅ | Max 1024 chars. Non-empty. Must describe both what the skill does and when to activate it. See Writing the description. |
license |
➖ | Short SPDX name or reference to a bundled LICENSE.txt. |
compatibility |
➖ | Max 500 chars. Only include if the skill has specific environment requirements (tools, Python version, network access, etc.). Most skills do not need this field. |
name: pr-review # ✅
name: create-issue # ✅
name: data-pipeline # ✅name: PR-Review # ❌ uppercase
name: -pr-review # ❌ starts with hyphen
name: pr--review # ❌ consecutive hyphens
name: pr_review # ❌ underscores not allowedThe description field is the primary triggering mechanism. The agent never reads your skill body until it decides the description matches the current task. A weak description means the skill never fires, no matter how good the body is.
- What it does — a concise statement of the skill's output or capability
- When to use it — explicit trigger phrases, domains, user intents
- Keywords — include both formal terms and casual phrasings a real user might type
Claude tends to under-trigger skills. Lean toward explicit activation language:
# Too vague — will often not trigger
description: Helps with pull request reviews.
# Better — explicit about when to activate
description: >
Pull request code review. Activate when asked to review a PR, check a diff,
or give feedback on code changes. Covers standard risk, elevated risk, API
contracts, dependency bumps, CI/CD changes, and infrastructure changes.
Applies the relevant sections based on what files the PR touches.
Produces concise comments grouped by severity: Blocker / Important / Nit.- Aim for 150–400 characters for most skills
- Do not pad to the 1024-char limit — filler dilutes signal
- Do not put "when to use" information only in the body; it belongs in
description
| Example | |
|---|---|
| ✅ Good | "Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents or when the user mentions PDFs, forms, or document extraction." |
| ❌ Poor | "Helps with PDFs." |
| ✅ Good | "Creates a GitHub issue from a natural language prompt. Triggers on requests like 'create an issue for X', 'open a bug report about Y', 'file a feature request for Z', 'add a ticket for W'." |
| ❌ Poor | "Opens GitHub issues." |
- Target under 500 lines for
SKILL.md. If you are approaching this limit, move supporting detail intoreferences/files and add clear pointers inSKILL.mdtelling the agent when and how to load them. - For large reference files (> 300 lines), include a table of contents at the top.
- When a skill supports multiple distinct domains or frameworks, create a
references/file per domain and let the skill body select which one to load based on context.
cloud-deploy/
├── SKILL.md # workflow + selection logic
└── references/
├── aws.md
├── gcp.md
└── azure.md
Focus on what the agent would not know without the skill: project-specific conventions, non-obvious edge cases, the particular APIs or tools to use, and team standards. Do not explain what a PDF is, how HTTP works, or what a migration does — the agent already knows.
<!-- ❌ Too verbose — the agent already knows what PDFs are -->
PDF (Portable Document Format) files are common documents that contain text
and images. To extract text you need a library. pdfplumber is recommended.
<!-- ✅ Better — jumps to what the agent wouldn't know -->
Use pdfplumber for text extraction. For scanned documents, fall back to
pdf2image + pytesseract.Prefer explaining why over issuing directives. Today's models respond better to reasoning than to rigid commands.
<!-- ❌ Rigid — brittle and hard to reason about -->
ALWAYS use the imperative form. NEVER use passive voice.
<!-- ✅ Better — gives the model room to apply good judgment -->
Use imperative form in instructions (e.g. "Run the linter" not "The linter
should be run") — it is clearer and easier for the agent to follow.If every test run of your skill independently writes the same helper script (a formatter, a validator, a transformer), bundle it in scripts/ and reference it from SKILL.md. This saves every future invocation from reinventing the wheel.
- Use
##and###headings to structure the body - Use numbered lists for sequential steps, bullet lists for non-ordered items
- Include short worked examples where they add clarity
- Keep code blocks minimal — a representative snippet beats an exhaustive reference
| Pattern | When to use |
|---|---|
| Gotchas | Environment-specific facts the agent will get wrong without being told. Keep in SKILL.md itself — the agent reads it before encountering the situation. |
| Output template | When you need a specific output format. A concrete template is more reliable than describing the format in prose. |
| Checklist | Multi-step workflows where skipping a step causes downstream failures: - [ ] Step 1: Run scripts/validate.py. |
| Validation loop | Any task where the agent should self-check before finishing: do → run validator → fix errors → repeat until clean. |
| Plan-validate-execute | Batch or destructive operations: generate a plan file → validate it against a source of truth → execute. |
Before proposing a PR, verify that your skill activates correctly and produces good output. The full testing
methodology — eval creation, fixture management, with/without comparisons, trigger testing, and description
optimization using the Anthropic skill-creator
skill — is covered in docs/skill-testing.md.
- Open an issue first using the Skill Proposal template to discuss scope before writing code
- Create your skill folder under
skills/following the structure in Skill structure - Run the tests described in Testing your skill and include benchmark results in the PR description
- Open a pull request; CODEOWNERS will be automatically requested for review
- Optionally, add
Copilotas a reviewer to get automated skill quality feedback
Before opening a pull request, verify:
- Folder name matches the
namefrontmatter field exactly -
nameis kebab-case, ≤ 64 chars, no consecutive hyphens -
descriptioncovers both what it does and when to trigger, with explicit keywords -
descriptionis ≤ 1024 chars and not padded with filler -
SKILL.mdbody is < 500 lines, or uses progressive disclosure viareferences/ - No hardcoded credentials, secrets, or internal paths in skill body or scripts
- Any script in
scripts/is referenced fromSKILL.mdwith usage guidance - New skill's description does not conflict with or shadow existing skills
- Evals exist (or a note explains why they are not applicable)
-
skills-ref validate ./skills/my-skillpasses (install:pip install skills-ref)