A SKILL.md is an agent-side instruction sheet. OMP indexes its frontmatter description, matches it against the live query, and injects the body into the prompt context on demand. Write it for a reader who has zero prior context and a tool budget.

1. 🧬 Anatomy

A skill is one folder under the cognitive filesystem (e.g. skills/<name>/SKILL.md) plus any assets it references. The file has four load-bearing layers:

LayerPurposeFailure if missing
Frontmattername + description drive discovery and injection matching.Skill never triggers.
ActivationAn explicit when-to-use line so the agent self-selects correctly.Triggers on the wrong queries or not at all.
Reference bodyDense, copy-pasteable rules, tables, and templates.Agent guesses; output drifts.
ValidationChecklists / anti-patterns the agent verifies before delivery.No quality gate; silent regressions.

2. πŸ”‘ Frontmatter

Only two keys are load-bearing. Keep description keyword-rich β€” it is the retrieval surface.

---
name: canvas-gen
description: >
  canvas-gen (JSON Canvas Generation for Quartz 5/Obsidian): Generates valid,
  visually stunning .canvas files following JSON Canvas Spec 1.0 with layout
  patterns, validation, and visual feedback loops.
globs: ["**/*.canvas"] # optional: auto-attach on matching paths
alwaysApply: false # optional: false = inject only on match
---
  • 🎯 name β€” kebab-case, matches the folder name.
  • 🎯 description β€” start with <name> (<Title>): then a one-sentence capability summary packed with trigger keywords.
  • 🧷 globs / alwaysApply β€” optional auto-attach controls; omit for pure query-matched skills.

3. 🧱 Skeleton

Annotated template β€” strip the # comments when authoring.

---
name: my-skill
description: >
  my-skill (Human Title): one-line capability statement with searchable keywords.
---
 
# πŸ› οΈ MY-SKILL: HUMAN TITLE
 
> **Core Directive:** the single non-negotiable outcome this skill guarantees.
 
## Activation
 
Trigger when: <explicit, comma-separated situations the agent should match>.
 
---
 
## <Topic> Reference
 
# Dense tables / type refs / config snippets. No prose padding.
 
| Field | Required | Values |
| :---- | :------- | :----- |
| ...   | ...      | ...    |
 
## Hard Rules
 
# MUST / NEVER constraints, grouped by sub-topic. This is the spine.
 
## Generation Template
 
# A runnable snippet (python/ts/yaml) the agent can copy and adapt.
 
## Validation Checklist
 
- [ ] <objective, checkable invariant>
- [ ] <second invariant>
 
## Anti-Patterns
 
| ❌ Don't         | βœ… Do Instead  |
| :--------------- | :------------- |
| <common mistake> | <correct move> |

4. πŸ“ Conventions

  • πŸ“¦ One concern per skill. A skill that does two things matches poorly and injects noise.
  • 🧊 Density over prose. Tables, checklists, and anti-pattern grids beat paragraphs β€” the agent scans, it doesn’t read.
  • πŸ” Make rules checkable. Every Hard Rule should map to a Validation Checklist item the agent can self-verify.
  • πŸ§ͺ Ship a template. A copy-pasteable skeleton (see canvas-gen’s generation template) removes ambiguity faster than any explanation.
  • 🚫 Anti-patterns are mandatory. The ❌ Don't / βœ… Do grid prevents the most expensive failures.
  • πŸ“Ž Reference real examples. Embed a condensed canonical artifact so the agent has a concrete shape to imitate.