|
| 1 | +--- |
| 2 | +name: skill-normalizer |
| 3 | +description: Convert skills in non-standard formats to the standard Agent Skills `SKILL.md` format. Validates YAML frontmatter (name, description, license, compatibility, metadata, allowed-tools), directory structure (SKILL.md, scripts/, references/, assets/), and best practices. Use when the user asks to normalize, validate, or fix a skill. |
| 4 | +license: Complete terms in LICENSE.txt |
| 5 | +--- |
| 6 | + |
| 7 | +Your task is to make skills in non-standard formats compatible with the Agent Skills ecosystem by converting them to the standard `SKILL.md` format. This document provides the specification for the `SKILL.md` format, including required and optional fields, directory structure, and best practices for writing effective skills. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +> ## Documentation Index |
| 12 | +> Fetch the complete documentation index at: https://agentskills.io/llms.txt |
| 13 | +> Use this file to discover all available pages before exploring further. |
| 14 | +
|
| 15 | +# Specification |
| 16 | + |
| 17 | +> The complete format specification for Agent Skills. |
| 18 | +
|
| 19 | +## Directory structure |
| 20 | + |
| 21 | +A skill is a directory containing, at minimum, a `SKILL.md` file: |
| 22 | + |
| 23 | +``` |
| 24 | +skill-name/ |
| 25 | +├── SKILL.md # Required: metadata + instructions |
| 26 | +├── scripts/ # Optional: executable code |
| 27 | +├── references/ # Optional: documentation |
| 28 | +├── assets/ # Optional: templates, resources |
| 29 | +└── ... # Any additional files or directories |
| 30 | +``` |
| 31 | + |
| 32 | +## `SKILL.md` format |
| 33 | + |
| 34 | +The `SKILL.md` file must contain YAML frontmatter followed by Markdown content. |
| 35 | + |
| 36 | +### Frontmatter |
| 37 | + |
| 38 | +| Field | Required | Constraints | |
| 39 | +| --------------- | -------- | ----------------------------------------------------------------------------------------------------------------- | |
| 40 | +| `name` | Yes | Max 64 characters. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen. | |
| 41 | +| `description` | Yes | Max 1024 characters. Non-empty. Describes what the skill does and when to use it. | |
| 42 | +| `license` | No | License name or reference to a bundled license file. | |
| 43 | +| `compatibility` | No | Max 500 characters. Indicates environment requirements (intended product, system packages, network access, etc.). | |
| 44 | +| `metadata` | No | Arbitrary key-value mapping for additional metadata. | |
| 45 | +| `allowed-tools` | No | Space-separated string of pre-approved tools the skill may use. (Experimental) | |
| 46 | + |
| 47 | +<Card> |
| 48 | + **Minimal example:** |
| 49 | + |
| 50 | + ```markdown SKILL.md theme={null} |
| 51 | + --- |
| 52 | + name: skill-name |
| 53 | + description: A description of what this skill does and when to use it. |
| 54 | + --- |
| 55 | + ``` |
| 56 | + |
| 57 | + **Example with optional fields:** |
| 58 | + |
| 59 | + ```markdown SKILL.md theme={null} |
| 60 | + --- |
| 61 | + name: pdf-processing |
| 62 | + description: Extract PDF text, fill forms, merge files. Use when handling PDFs. |
| 63 | + license: Apache-2.0 |
| 64 | + metadata: |
| 65 | + author: example-org |
| 66 | + version: "1.0" |
| 67 | + --- |
| 68 | + ``` |
| 69 | +</Card> |
| 70 | + |
| 71 | +#### `name` field |
| 72 | + |
| 73 | +The required `name` field: |
| 74 | + |
| 75 | +* Must be 1-64 characters |
| 76 | +* May only contain unicode lowercase alphanumeric characters (`a-z`) and hyphens (`-`) |
| 77 | +* Must not start or end with a hyphen (`-`) |
| 78 | +* Must not contain consecutive hyphens (`--`) |
| 79 | +* Must match the parent directory name |
| 80 | + |
| 81 | +<Card> |
| 82 | + **Valid examples:** |
| 83 | + |
| 84 | + ```yaml theme={null} |
| 85 | + name: pdf-processing |
| 86 | + ``` |
| 87 | +
|
| 88 | + ```yaml theme={null} |
| 89 | + name: data-analysis |
| 90 | + ``` |
| 91 | +
|
| 92 | + ```yaml theme={null} |
| 93 | + name: code-review |
| 94 | + ``` |
| 95 | +
|
| 96 | + **Invalid examples:** |
| 97 | +
|
| 98 | + ```yaml theme={null} |
| 99 | + name: PDF-Processing # uppercase not allowed |
| 100 | + ``` |
| 101 | +
|
| 102 | + ```yaml theme={null} |
| 103 | + name: -pdf # cannot start with hyphen |
| 104 | + ``` |
| 105 | +
|
| 106 | + ```yaml theme={null} |
| 107 | + name: pdf--processing # consecutive hyphens not allowed |
| 108 | + ``` |
| 109 | +</Card> |
| 110 | +
|
| 111 | +#### `description` field |
| 112 | + |
| 113 | +The required `description` field: |
| 114 | + |
| 115 | +* Must be 1-1024 characters |
| 116 | +* Should describe both what the skill does and when to use it |
| 117 | +* Should include specific keywords that help agents identify relevant tasks |
| 118 | + |
| 119 | +<Card> |
| 120 | + **Good example:** |
| 121 | + |
| 122 | + ```yaml theme={null} |
| 123 | + description: 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. |
| 124 | + ``` |
| 125 | + |
| 126 | + **Poor example:** |
| 127 | + |
| 128 | + ```yaml theme={null} |
| 129 | + description: Helps with PDFs. |
| 130 | + ``` |
| 131 | +</Card> |
| 132 | + |
| 133 | +#### `license` field |
| 134 | + |
| 135 | +The optional `license` field: |
| 136 | + |
| 137 | +* Specifies the license applied to the skill |
| 138 | +* We recommend keeping it short (either the name of a license or the name of a bundled license file) |
| 139 | + |
| 140 | +<Card> |
| 141 | + **Example:** |
| 142 | + |
| 143 | + ```yaml theme={null} |
| 144 | + license: Proprietary. LICENSE.txt has complete terms |
| 145 | + ``` |
| 146 | +</Card> |
| 147 | + |
| 148 | +#### `compatibility` field |
| 149 | + |
| 150 | +The optional `compatibility` field: |
| 151 | + |
| 152 | +* Must be 1-500 characters if provided |
| 153 | +* Should only be included if your skill has specific environment requirements |
| 154 | +* Can indicate intended product, required system packages, network access needs, etc. |
| 155 | + |
| 156 | +<Card> |
| 157 | + **Examples:** |
| 158 | + |
| 159 | + ```yaml theme={null} |
| 160 | + compatibility: Designed for Claude Code (or similar products) |
| 161 | + ``` |
| 162 | + |
| 163 | + ```yaml theme={null} |
| 164 | + compatibility: Requires git, docker, jq, and access to the internet |
| 165 | + ``` |
| 166 | + |
| 167 | + ```yaml theme={null} |
| 168 | + compatibility: Requires Python 3.14+ and uv |
| 169 | + ``` |
| 170 | +</Card> |
| 171 | + |
| 172 | +<Note> |
| 173 | + Most skills do not need the `compatibility` field. |
| 174 | +</Note> |
| 175 | + |
| 176 | +#### `metadata` field |
| 177 | + |
| 178 | +The optional `metadata` field: |
| 179 | + |
| 180 | +* A map from string keys to string values |
| 181 | +* Clients can use this to store additional properties not defined by the Agent Skills spec |
| 182 | +* We recommend making your key names reasonably unique to avoid accidental conflicts |
| 183 | + |
| 184 | +<Card> |
| 185 | + **Example:** |
| 186 | + |
| 187 | + ```yaml theme={null} |
| 188 | + metadata: |
| 189 | + author: example-org |
| 190 | + version: "1.0" |
| 191 | + ``` |
| 192 | +</Card> |
| 193 | + |
| 194 | +#### `allowed-tools` field |
| 195 | + |
| 196 | +The optional `allowed-tools` field: |
| 197 | + |
| 198 | +* A space-separated string of tools that are pre-approved to run |
| 199 | +* Experimental. Support for this field may vary between agent implementations |
| 200 | + |
| 201 | +<Card> |
| 202 | + **Example:** |
| 203 | + |
| 204 | + ```yaml theme={null} |
| 205 | + allowed-tools: Bash(git:*) Bash(jq:*) Read |
| 206 | + ``` |
| 207 | +</Card> |
| 208 | + |
| 209 | +### Body content |
| 210 | + |
| 211 | +The Markdown body after the frontmatter contains the skill instructions. There are no format restrictions. Write whatever helps agents perform the task effectively. |
| 212 | + |
| 213 | +Recommended sections: |
| 214 | + |
| 215 | +* Step-by-step instructions |
| 216 | +* Examples of inputs and outputs |
| 217 | +* Common edge cases |
| 218 | + |
| 219 | +Note that the agent will load this entire file once it's decided to activate a skill. Consider splitting longer `SKILL.md` content into referenced files. |
| 220 | + |
| 221 | +## Optional directories |
| 222 | + |
| 223 | +### `scripts/` |
| 224 | + |
| 225 | +Contains executable code that agents can run. Scripts should: |
| 226 | + |
| 227 | +* Be self-contained or clearly document dependencies |
| 228 | +* Include helpful error messages |
| 229 | +* Handle edge cases gracefully |
| 230 | + |
| 231 | +Supported languages depend on the agent implementation. Common options include Python, Bash, and JavaScript. |
| 232 | + |
| 233 | +### `references/` |
| 234 | + |
| 235 | +Contains additional documentation that agents can read when needed: |
| 236 | + |
| 237 | +* `REFERENCE.md` - Detailed technical reference |
| 238 | +* `FORMS.md` - Form templates or structured data formats |
| 239 | +* Domain-specific files (`finance.md`, `legal.md`, etc.) |
| 240 | + |
| 241 | +Keep individual [reference files](#file-references) focused. Agents load these on demand, so smaller files mean less use of context. |
| 242 | + |
| 243 | +### `assets/` |
| 244 | + |
| 245 | +Contains static resources: |
| 246 | + |
| 247 | +* Templates (document templates, configuration templates) |
| 248 | +* Images (diagrams, examples) |
| 249 | +* Data files (lookup tables, schemas) |
| 250 | + |
| 251 | +## Progressive disclosure |
| 252 | + |
| 253 | +Agents load skills *progressively*, pulling in more detail only as a task calls for it. Skills should be structured to take advantage of this: |
| 254 | + |
| 255 | +1. **Metadata** (\~100 tokens): The `name` and `description` fields are loaded at startup for all skills |
| 256 | +2. **Instructions** (\< 5000 tokens recommended): The full `SKILL.md` body is loaded when the skill is activated |
| 257 | +3. **Resources** (as needed): Files (e.g. those in `scripts/`, `references/`, or `assets/`) are loaded only when required |
| 258 | + |
| 259 | +Keep your main `SKILL.md` under 500 lines. Move detailed reference material to separate files. |
| 260 | + |
| 261 | +## File references |
| 262 | + |
| 263 | +When referencing other files in your skill, use relative paths from the skill root: |
| 264 | + |
| 265 | +```markdown SKILL.md theme={null} |
| 266 | +See [the reference guide](references/REFERENCE.md) for details. |
| 267 | +
|
| 268 | +Run the extraction script: |
| 269 | +scripts/extract.py |
| 270 | +``` |
| 271 | + |
| 272 | +Keep file references one level deep from `SKILL.md`. Avoid deeply nested reference chains. |
| 273 | + |
| 274 | +## Validation |
| 275 | + |
| 276 | +Use the [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) reference library to validate your skills: |
| 277 | + |
| 278 | +```bash theme={null} |
| 279 | +skills-ref validate ./my-skill |
| 280 | +``` |
| 281 | + |
| 282 | +This checks that your `SKILL.md` frontmatter is valid and follows all naming conventions. |
0 commit comments