Appendix F — Markdown and YAML for Skill Files

Learn the Markdown and YAML needed to read and maintain skill files.

Felix Reyes · The Skills Pack · First edition, 2026 · CC BY 4.0 · Router

A skill file is written in two languages: YAML in the frontmatter, Markdown in the instructions. The specification limits the frontmatter’s fields and leaves the Markdown free. This appendix covers the parts the book’s files use and how the validator and checks read them. A deliverable is Markdown too.

Markdown

Two files show most of it. The first is step 2 of the revenue-bridge leaf, printed in Section 7.5. The second is the start of the Results section of a budget-vs-actual note a host wrote in a test run of the pack at version 1.0.0. The note passed every check.

File: runs/20261004-0335-repeat-variance-bridge-claude-opus-5-5/budget-vs-actual-fy25/claude/r1/output/bva-note.md (lines 6–12).

## Results
| Measure | Actual | Budget | Variance |
| --- | --- | --- | --- |
| Revenue | $11.2M | $11.6M | ($362K) |
| COGS | $8.3M | $8.5M | $167K |
| Gross profit | $2.9M | $3.1M | ($194K) |
| Gross margin | 25.9% | 26.8% | (0.9) pts |

Headings and paragraphs

A line that starts with # and a space is a heading: # for a title, ## for a section. The book’s files use no other level. The contract check finds a deliverable’s sections by ## and a space alone, so a note’s title belongs to no section and a ### subheading stays inside the section above it.

A blank line ends a paragraph. A line break inside one counts as a space, and the contract check joins a section’s lines before it counts sentences.

Lists

A line that starts with a hyphen and a space is a bullet; one that starts with a number and a period is a numbered item. A continuation line is indented to the item’s text, as in step 2. The contract check counts bullets with this function:

File: packs/variance-bridge/tests/checks.py (lines 156–157).

def _bullets(body: str) -> list[str]:
    return [line for line in body.splitlines() if re.match(r"^\s*([-*+]|\d{1,2}\.)\s+", line)]

A line counts when, after any indent, it starts with -, *, + or a number of one or two digits and a period, then a space, so a bullet that wraps onto a second line beginning - at ($686K). counts as two bullets.

Emphasis and inline code

Two asterisks on each side make a phrase bold; one * or _ makes it italic. The checks look through the marks: a table cell is compared without them, and a bold figure is still a figure.

Backticks mark a literal. In a skill file, a literal with a slash and no space is a path, which the validator requires to exist relative to the pack root unless it is a user-side path (Section 7.5). Every script is named once this way, which is why step 2 writes skills/revenue-bridge/scripts/bridge.py.

Lines indented four spaces form a code block, shown as written (seven inside a list item, as in step 2). Fifteen of the sixteen leaves write their output contract this way, so its ## Headline lines do not become sections of the skill file. A fence, a line of three backticks above and below, makes a block without the indent. The packs use none, and in a note the provenance check still reads the figures inside one.

A link is written [text](target). The validator checks the target as a path, after dropping an anchor such as #loss, and skips web addresses. The packs have no links.

Pipe tables and comments

A pipe table is a header row, a separator row of hyphens and bars, and one line for each row, as in the note’s Results. The contract check takes a section’s first table, the lines that start with a bar up to the first that does not, so a blank line cuts a table short. It splits cells at the bars, so a bar inside a cell breaks it. The validator finds the routing table the same way.

Text between <!-- and --> is an HTML comment, hidden in a rendered view and read by a model. The runner’s trace tokens are such comments (Chapter 9).

YAML frontmatter

Here is a pack-local skill’s frontmatter:

File: packs/forecast-planning/_shared/driver-model/SKILL.md (lines 1–4).

---
name: driver-model
description: "InterStationary's planning model: how revenue, gross profit, operating expenses and EBITDA are computed from the six drivers, and the fixed order in which driver changes are walked. Read by other skills in the pack; not triggered on its own."
---

It opens on the file’s first line with three hyphens, ---, and closes at the next such line. Even a blank line before the opening fence breaks the file. Each line between is a field: a key, a colon, a space and a value that runs to the end of the line.

When to quote

Quote a value in three cases. A colon and a space start another key, so the description above, which contains one, is quoted. On a copy of the Chapter 4 stage with the description unquoted, the validator reported spec 2.2: invalid YAML frontmatter (ScannerError), and the reference validator gave the cause, mapping values are not allowed here.

A space and a # start a comment, which drops the rest of the line without an error: on another copy, #1 added after “budget vs actual” cut the description from 381 characters to 183, and the file validated.

A value that looks like a number is read as one, so 1.10 becomes 1.1. That is the mistake to watch in metadata, a map whose keys sit on the lines below it, indented two spaces, and whose three values must be strings. Section 4.4 prints the map and the validator’s error for an unquoted version.

What breaks a file

YAML indents with spaces only. Three copies of the stage, one with a byte-order mark (an invisible character some editors write at the start of a file), one with no closing fence and one with a tab before a key, gave these errors:

  error: SKILL.md: spec 2.2: byte-order mark; save as UTF-8 without BOM
  error: SKILL.md: spec 2.2: no YAML frontmatter between --- lines
  error: SKILL.md: spec 2.2: invalid YAML frontmatter (ScannerError)

All chaptersDownload & licenseBook text CC BY 4.0