---
name: skill-authoring
description: Authors or revises Agent Skills SKILL.md files—frontmatter triggers, progressive disclosure, and lint-friendly structure. Use when creating a new skill, improving an undertriggered description, splitting an oversized skill body, or aligning with the Agent Skills standard (agentskills.io). Harvest patterns from peer repos but write original instructions for this library.
category: documentation
keywords: skill, authoring, frontmatter, description, agentskills, trigger
---

# Skill Authoring

## When to apply

Use when adding a skill to a curated library, when agents rarely activate an existing skill (weak `description`), or when a skill body has grown past a single-screen workflow. Inspired by **anthropics/skills** (`skill-creator`) and **agentskills.io**; adapted to Skillsheet's lint rules.

## Anatomy (standard layout)

```
skills/<slug>/
└── SKILL.md    # required — YAML frontmatter + Markdown body
```

Optional bundled dirs (`scripts/`, `references/`, `assets/`) exist in the ecosystem; this library is **Markdown-only** unless the project explicitly adds bundle support.

## Frontmatter (Skillsheet)

| Key | Required | Notes |
|-----|----------|--------|
| `name` | Yes | Must equal directory slug (`^[a-z0-9]+(-[a-z0-9]+)*$`). |
| `description` | Yes | ≤ 500 chars. **What + when** — the primary trigger; put "when to use" here, not only in the body. |
| `category` | Recommended | Single slug for catalog chips/packs. |
| `keywords` | Recommended | ≤ 10 tags, each ≤ 40 chars — search, not triggers. |

Peer pattern (Anthropic): descriptions tend to **undertrigger** — include concrete user phrases and adjacent tasks ("even if they don't say 'skill'") without keyword stuffing.

## Body structure

1. **When to apply** — short situational gate (body reinforces, does not replace, `description`).
2. **Workflow** — numbered steps the agent can follow under pressure.
3. **Rules / anti-patterns** — what not to do.
4. **Related skills** — `[slug](/skills/slug)` links for handoffs.
5. **Worked example** (optional) — one realistic mini-scenario.

Keep the body under ~500 lines. Move long reference tables to a separate doc in the **host repo** (not inside the skill) until bundled `references/` is supported.

## Authoring workflow

1. **Intent** — One sentence: what capability should exist after the skill fires?
2. **Trigger draft** — Write `description` first; read it aloud as "would an agent pick this for task X?"
3. **Skeleton** — Create `skills/<slug>/SKILL.md`; `name` matches slug.
4. **Wire the library** — Add a situation row to [choose-skill](/skills/choose-skill) in the **same change**.
5. **Verify** — Run `bun run test` (content lint + `chooseSkillRouter` coverage gate for the routing table).

## Quality checks before merge

- [ ] `name` === directory name
- [ ] Description states **what** and **when** within length caps
- [ ] Body is non-empty and scannable (headings, lists, one primary workflow)
- [ ] Related skills use real slugs in this library
- [ ] No vendor doc dump — distill peer ideas into **original** prose

## Related skills

- [peer-skill-harvest](/skills/peer-skill-harvest) — When the new skill should come from ecosystem research, not greenfield authoring.
- [housekeeping-docs](/skills/housekeeping-docs) — When the skill ships alongside README/ARCHITECTURE/TODO updates.
- [choose-skill](/skills/choose-skill) — Router table must gain a row for every new skill.