| 💾 Saved. d722711 k33g 8h ago | 1 | # Reference: skill file format |
| 2 | |
| 3 | > Neutral description of the markdown files the `read_skill` tool serves. |
| 4 | |
| 5 | ## Location |
| 6 | |
| 7 | | Rule | Value | |
| 8 | |------|-------| |
| 9 | | Directory | `skillsDir` (default `skills`). | |
| 10 | | Patterns | `<skillsDir>/<name>.md` (flat) and `<skillsDir>/<name>/SKILL.md` (one directory per skill), mixed freely. Other files in a skill's directory are ignored. | |
| 11 | | Skill name on disk | The file name without `.md`, or the directory name for a `SKILL.md`. | |
| 12 | | Both forms for one name | `read_skill` returns the flat file. | |
| 13 | | Missing directory | Not an error: zero skills, `read_skill` not declared. | |
| 14 | |
| 15 | ## Front matter |
| 16 | |
| 17 | Optional. When present, the file starts with a line `---` and the header ends at the next `---` line. Only two keys are read; the others are ignored. |
| 18 | |
| 19 | | Key | Type | Default | Description | |
| 20 | |-----|------|---------|-------------| |
| 21 | | `name` | string | file name without `.md` | Name shown in the catalogue and accepted by `read_skill`. An empty value keeps the default. | |
| 22 | | `description` | string | `""` | One-line summary shown in the catalogue. | |
| 23 | |
| 24 | A `description:` line in the body, after the closing `---`, is not metadata. |
| 25 | |
| 26 | ## Catalogue rendering |
| 27 | |
| 28 | The tool description is: |
| 29 | |
| 30 | ``` |
| 31 | Load a skill: the step-by-step procedure to follow for this kind of task. Call it BEFORE doing the work, with the name of the matching skill, and then follow what it says. Available skills: |
| 32 | <name> — <description> |
| 33 | <name> |
| 34 | ``` |
| 35 | |
| 36 | Entries are sorted by name; the ` — <description>` part is omitted when the description is empty. |
| 37 | |
| 38 | ### Example |
| 39 | |
| 40 | ```markdown |
| 41 | --- |
| 42 | name: what-time-is-it |
| 43 | description: Give the current date and time. |
| 44 | keywords: time, date, clock |
| 45 | --- |
| 46 | |
| 47 | # What time is it? |
| 48 | |
| 49 | Run: |
| 50 | |
| 51 | ```bash |
| 52 | date "+%A %d %B %Y — %H:%M:%S (%Z)" |
| 53 | ``` |
| 54 | ``` |
| 55 | |
| 56 | The `keywords` key is accepted in the file and ignored by the loader. |
| 57 | |
| 58 | ## Shipped examples |
| 59 | |
| 60 | | Path | `name` | `description` | |
| 61 | |------|--------|---------------| |
| 62 | | `skills/greetings/SKILL.md` | `greetings` | Greet somebody with a festive message. | |
| 63 | | `skills/vulcan-salute/SKILL.md` | `vulcan-salute` | Send a vulcan salute to somebody. | |
| 64 | | `skills/what-time-is-it/SKILL.md` | `what-time-is-it` | Give the current date and time. | |
| 65 | |
| 66 | They use the directory-per-skill layout; started from the repository root, `mm` reports `skills: 3`. |