# Writing a skill

> The editor, saving, files beside SKILL.md, preview and focus mode.

A skill is a `SKILL.md`: frontmatter between two `---` lines, then Markdown that tells the agent what to do. The frontmatter has its own page, [The frontmatter](https://spellbook.getmurmur.dev/docs/frontmatter.md); this one is about the text.

## The editor

The editor shows Markdown as you type it. Its syntax is dimmed, never hidden, so what you see is what the agent reads. Heading, quote and list marks hang in the margin, so the words keep one clean left edge.

*Illustration: The editor with a heading Commit messages, two lines of text, a second-level heading Rules with its two hash marks in the margin, two list items with dashes in the margin, and a quote with its mark in the margin. A heading, a list and a quote, with their marks in the margin.*

- **Preview** (`⇧⌘P`) shows the file rendered, and again to go back to the text.
- **Focus mode** (`⌘.`) hides the library and the agent, dims everything but the paragraph you're in, and keeps your line in the middle of the window.
- **Find** (`⌘F`) searches the open file.
- **The editor font** is Untitled Sans, or Geist Mono if you prefer a fixed width: Settings → Appearance.

## The sigil

Each skill has a sigil, a gold mark drawn from its name, in the library and beside the header. The same name always draws the same mark. It grows as the skill proves itself in its evals: a single star for a draft; a ring of petals once a run has finished; and the whole mark cut through a gold tile when the latest run passes most cases with the skill and beats the baseline. Hover it for the counts.

At larger sizes, small marks round its edge show where it's installed and which kinds of file it has beside `SKILL.md`. A dot at the top means other agents keep finding it helpful (see [Spellbook tools](https://spellbook.getmurmur.dev/docs/tools.md)); that never moves it up a stage.

**Sigils** in `⌘K` lays out your whole collection: how many skills are proven, tested and drafts, and how many are installed, every sigil you've earned, gold ones first, and the milestones on the way, such as your first proven skill. Choose a sigil to open its skill.

## Saving

Spellbook saves about half a second after you stop typing, and when you leave the editor. `⌘S` saves at once. The status bar says when it's saved.

If the file changes on disk while you have edits that aren't saved, a bar asks what to do: **Reload** takes the version on disk, **Keep mine** keeps yours. Nothing is overwritten until you choose.

## Files beside SKILL.md

A skill can have reference files, scripts and examples beside its `SKILL.md`, such as `references/style.md` or `scripts/check.sh`. When it has more than one file, they show under the skill in the library, folders and all, and ⌘K finds them too. To add one, right-click the skill and choose New file, right-click a folder to add one inside it, or use New file in ⌘K, then type its path, such as `references/style.md`. Right-clicking the space under your skills offers New skill. Any folders on the way are made for you. Right-click a file to rename it, which can move it to another folder, or to move it to the Bin. `SKILL.md` stays, since it's the skill itself. Link to them from `SKILL.md` with a line on when to read each, so the agent loads them only when it needs them.

Lint warns when a link or a path in backticks names a file the skill doesn't have.

## What makes a good skill

The agent's writing rules (Settings → Writing) are the house view, and the agent follows them when it drafts. In short:

- Every line should change what the agent does. Cut any line that wouldn't.
- Describe how to decide and what to check, not a fixed answer to copy.
- Give each rule its reason in a short clause, so the agent can handle a case the rule didn't foresee.
- Be specific: "Commit subjects under 60 characters, in the imperative" does more than "keep it short".
- Keep `SKILL.md` under about 500 lines, and move long reference material into files beside it.
