Skill format
This page defines what Trailguide accepts in a skill: its folder, its SKILL.md file, and the Trailguide keys in its metadata. The same format applies to every skill a repository authors, whether it’s a library, a project, or both. For how to write a skill well, see Write a skill.
A skill uses the Agent Skills format. Trailguide adds optional metadata keys and checks the rest of the format as the Agent Skills specification defines it, so a skill that passes trailguide library check also works in tools that read Agent Skills directly.
Skill folders
Section titled “Skill folders”Where a repository keeps the skills it authors depends on what it is:
- A library of library schema version 3 writes its skills in
skills/src/at the repository root, andtrailguide library buildbuilds the skills it publishes intoskills/dist/, one flat folder per skill. - A project keeps its skills in
.trailguide/skills/, besiderules/, one folder per skill, forks included. - A library of library schema version 2 keeps its skills in
.trailguide/skills/, inside a folder for each skill’s origin.
Skills in a library
Section titled “Skills in a library”A library named engineering with a stack of related skills, a standalone skill, and a file its skills share:
skills/ README.md src/ stacks/ delivery/ README.md overview.md media/ cover.png skills/ build-feature/ SKILL.md README.md overview.md media/ demo.mp4 demo-poster.png references/ slicing.md shared/ verify.sh skills/ review-tests/ SKILL.md shared/ review-checklist.md dist/ build-feature/ review-tests/skills/src/skills/<name>/ holds a standalone skill, skills/src/stacks/<stack>/skills/<name>/ a skill in a stack, and skills/src/shared/ and a stack’s shared/ files that skills link to. Library build copies each linked shared file or folder into every skill that links to it, so each built skill in skills/dist/ stands alone. A skill’s README.md is its page for people reading the repository, its overview.md its overview page for people deciding whether to use it, and its media/ folder the images and video they show; none of them ship. A stack can have its own overview.md and media/ too. skills/README.md is the skills index library build writes. Skills in the library schema defines each folder and what a built skill holds.
Edit skills/src/, never skills/dist/: run trailguide library build after every change and commit both. trailguide library check fails until skills/dist/ and skills/README.md are exactly what the sources build.
Skills in a project folder
Section titled “Skills in a project folder”A project keeps the skills it authors in .trailguide/skills/, one folder per skill, named for the skill. A fork of a source’s skill sits there too, under its own name: its skills.forks entry in the configuration records which source it replaces, so the folder doesn’t need to. Project files shows the whole layout. In a project that forks fix-bug from its source fabrica:
.trailguide/skills/ README.md release-checklist/ SKILL.md references/ steps.md fix-bug/ SKILL.md scripts/ verify.shEach skill folder holds a SKILL.md file and anything the skill bundles. The Agent Skills format suggests scripts/ for code the agent runs, references/ for documents it reads when needed, and assets/ for templates and other files it uses, but any layout inside the folder works. The assets/ folder inside a skill belongs to the skill; it isn’t a rule asset directory, and the project’s shared assets directory, .trailguide/assets/, isn’t part of any skill.
skills/ holds only skill folders and an optional README.md. A skill folder can’t contain another skill’s SKILL.md, and it can’t contain _group.yaml. Skills don’t belong to rule groups, so a skill folder is never inside rules/.
Trailguide 0.9 kept a project’s skills in origin folders: skills/local/<name>/ for the project’s own skills, and skills/<source>/<name>/ for a fork of that source’s skill. In a project that still keeps any there, every project command but trailguide project sync and trailguide project migrate fails with layout-migration-needed and writes nothing, and so does trailguide project create skill. Run migrate once, offline, to move each skill to skills/<name>/ and remove the emptied origin folders:
trailguide project migrate --dry-runtrailguide project migrateA skill’s ID, such as skills/review, doesn’t change, so config.yaml needs no edits. Migrate keeps every file’s executable bit and rewrites each relative link in a moved skill’s Markdown for the move: a link to a file that doesn’t move loses one ../, and a link to a skill in another origin folder names its new folder. When two origin folders hold a skill with the same name, such as skills/local/review/ and skills/pstack/review/, migrate fails and writes nothing, naming both, since a skill’s name is its ID: keep one, with any edits you want from the other, and delete the other. Migrate the project layout covers the rest of the move.
Origin folders
Section titled “Origin folders”A library of library schema version 2 keeps its skills in .trailguide/skills/, one folder per skill, inside a folder for the skill’s origin. In a library named engineering that forks a skill from its source pstack:
skills/ README.md engineering/ build-feature/ SKILL.md references/ slicing.md scripts/ verify.sh review-tests/ SKILL.md pstack/ show-me-your-work/ SKILL.mdThe origin folder says where a skill comes from:
- The library’s own skills go in
skills/<library.name>/, such asskills/engineering/. See Library name. - A fork of a source’s skill goes in the folder named for that source, such as
skills/pstack/, the source whoseskills.forksrecords it. See Fork a skill.
The origin folder isn’t part of the skill’s ID, so moving a skill between origins, such as when you remove its fork entry, doesn’t change its ID.
skills/ holds only origin folders and an optional README.md, and each origin folder holds only skill folders, with the same rules for each skill folder as in a project. Two skills can’t share a name, even in different origin folders. A skill in the wrong origin folder fails validation with a message that names the folder to move it to. trailguide library migrate moves a library to library schema version 3, which has no origin folders.
Trailguide 0.8 and earlier kept skill folders directly in skills/. In a library of library schema version 2 that still keeps any there, every command but trailguide library migrate fails and writes nothing of its own, listing each folder and the origin folder it belongs in, from the repository root. trailguide library migrate moves those folders to library schema version 3, rewriting their links. To stay on version 2, move each folder with every file it bundles, add one ../ to each link from it to a file outside its folder, and run the command again.
Git-tracked files
Section titled “Git-tracked files”A skill’s content is the files Git tracks in its folder. Files Git ignores, such as __pycache__/, node_modules/, or .venv/ that a skill’s scripts create, are neither versioned nor installed. trailguide library check warns about a file in a skill folder that Git neither tracks nor ignores, because it isn’t part of the skill until you commit it. A repository outside Git has no library releases, and Trailguide reads every file in each skill folder.
Symbolic links, submodules, and Git LFS pointers aren’t supported in a skill folder, as for every file Trailguide takes from a source.
File modes
Section titled “File modes”A file’s executable bit is part of the skill’s content. Git records it as mode 100755 for an executable file and 100644 for any other file. Trailguide keeps the mode in a project’s vendor snapshot and in every installed copy, so a step that runs ./scripts/verify.sh works after install. Changing only a file’s mode is a change to the skill, and after the first library release it needs a change note, like any other change.
File contents
Section titled “File contents”Markdown files in a skill folder, including SKILL.md, must be UTF-8, so their links can be checked. Other files can be binary; Trailguide keeps their original bytes. The source limits on file size and count apply to skill files as to any other vendored file.
Skill IDs
Section titled “Skill IDs”For a skill a repository authors, its ID is skills/<name>, such as skills/build-feature, whichever folder holds it: a stack, an origin folder, or none. For a skill in a non-library source, it’s the folder’s path from the repository root, or from the source’s path when it takes one folder, such as skills/engineering/to-spec. A skill’s identity is its repository and the source’s path, plus its ID, so two sources that reach the same repository, or the same folder of it, name the same skill, while two folders can each have a skill with the same ID.
In a project, an ID from a source is qualified by the source name the project chose, such as fabrica:skills/build-feature. A skill a library curates adds the curated source’s name, such as fabrica:mattpocock:skills/engineering/to-spec. An authored skill’s ID has no source name. See Source names and IDs.
<name> follows the Agent Skills name grammar:
- 1 to 64 characters,
- only lowercase letters
a–z, digits0–9, and hyphens-, - not starting or ending with a hyphen, and
- no two hyphens in a row.
The folder name is the skill’s name, and it must equal the name field in its SKILL.md. Renaming the folder changes the skill’s ID. In a library, a rename retires the old ID, replaced by the new one; see Retire or replace a skill. A retired skill’s ID can’t be reused.
The name is also the skill’s install name, the folder name of every installed copy, such as .claude/skills/build-feature/, so two skills with the same name can’t be installed in one project, even from different sources. A project resolves a clash by giving one of them an alias, which changes the install name but not the ID.
Frontmatter
Section titled “Frontmatter”SKILL.md starts with YAML frontmatter, from the first byte of the file, followed by a non-blank Markdown body with the skill’s instructions:
---name: build-featuredescription: Build a feature from an agreed spec, one slice at a time. Use when starting implementation of a new feature or a change to an existing one.license: MITmetadata: trailguide-skill-type: playbook trailguide-rules-used: | practices/architecture/decide-module-boundaries-first practices/testing/test-behavior-not-implementation trailguide-skills-used: | skills/tdd---
1. Read the spec and name the slice you're building.2. ...These are the Agent Skills fields. Unknown top-level fields are rejected, because tools that read Agent Skills, such as claude.ai, reject them too.
| Field | Meaning |
|---|---|
name | Required. The skill’s name, following the name grammar. Must equal the folder name. |
description | Required. One non-blank string of at most 1,024 characters saying what the skill does and when to use it. Agents read it to decide when to load the skill, so name the task that should trigger it. |
license | Optional string naming the skill’s license, such as an SPDX expression. Informational in a library; see Licenses. |
compatibility | Optional non-blank string of at most 500 characters describing what the skill needs to run, such as tools, network access, or a product. |
allowed-tools | Optional string listing tools the skill is approved to use, separated by spaces, as the Agent Skills format defines it. Trailguide preserves it and doesn’t interpret it. |
metadata | Optional map of string keys to string values. Trailguide reads the keys below and preserves every other key unchanged. |
The frontmatter uses one YAML document. Duplicate keys, anchors, aliases, and explicit tags are rejected. A value that YAML reads as something other than a string, such as true or 2026-10-14, must be quoted where a string is required.
A skill has no version field, and no metadata key sets its version. In a library, its version comes from library releases; see Rule and skill versions.
Metadata
Section titled “Metadata”Trailguide reads six optional keys under metadata that authors write: the three trailguide- keys in the table below, and three keys for the text agents show. It also writes two provenance keys into the copies it builds and installs. Each value is a string, as the Agent Skills format requires, so the file stays valid everywhere skills are read.
| Key | Value | Checks |
|---|---|---|
trailguide-skill-type | playbook or review | Must be a type on the canonical list. Unknown values fail trailguide library check. |
trailguide-rules-used | The IDs of the rules the skill applies, one per line | Each must be a current rule in this repository, or, outside a library, in a source the project names. |
trailguide-skills-used | The IDs of the skills this skill calls, one per line | Each must be a current skill in the same repository, other than this one, or, in a library, a skill the library curates, and the skills called can’t form a cycle. |
Other metadata keys, such as author, are preserved and ignored, apart from the interface keys below. Keys that start with trailguide- are reserved for Trailguide, so any other trailguide- key fails trailguide library check. The two provenance keys belong only in the copies Trailguide builds and installs, and fail check in a skill’s source.
Provenance
Section titled “Provenance”Trailguide writes two more trailguide- keys into the copies of a skill it builds and installs, never into the skill you edit. They record where the skill comes from, so projects and catalogs can show it:
| Key | Value | Written by |
|---|---|---|
trailguide-stack | The name of the skill’s stack, such as 5k | trailguide library build, for a skill in skills/src/stacks/<stack>/ |
trailguide-forked-from | Where a fork came from: the source’s repository, //, the forked skill’s path there, and @ and the commit the fork is based on | trailguide library build, for a skill the library’s skills.forks records; trailguide project sync, update, and build, in the installed copy of a project’s fork |
metadata: trailguide-skill-type: playbook trailguide-forked-from: "https://github.com/example/pstack.git//pstack/skills/poteto-mode@699e1e7488c53c05ca13409f40da83cd37682091" trailguide-stack: "5k"The // separates the repository from the skill’s path in it, as Terraform module sources do. The commit is left out when the fork records no basedOn. For a skill of a source with a path, the skill’s path starts with that folder, as it does in the repository. For a project’s fork of a skill its library source curates, the repository and ID are those the skill was curated from, as basedOn is a commit of that repository. Neither key goes in a skill’s source: trailguide library build, trailguide library check, and trailguide project build fail when one is there. Edit skills.forks instead; trailguide library check fails until the built copy is rebuilt. Forking a skill leaves out the provenance of the copy you fork, since your fork’s own is written when it’s built or installed.
Projects show provenance only from skills a library publishes; a repository that isn’t a library has no build to write it, so its skills show none, whatever their metadata says. Values that aren’t in the forms above are ignored. Provenance alone isn’t a change to a skill: when a build adds or updates it, trailguide library check asks for no change note, and the skill’s version stays the same.
Releases before provenance read both keys as unknown trailguide- keys and build without them, so their check would call the built skills stale and their build would strip the keys. So while minTrailguideVersion still names a release before 0.13.0, the first that writes provenance, or none, a release build that writes provenance raises it to its own version: trailguide library build in library.yaml, and, in config.yaml of a project that forks a skill, trailguide project fork skill, trailguide project build, and trailguide project sync. Older releases then refuse the repository with a message naming the release to install. Each command says when it raises the field, and warns when the repository’s check workflow installs an older release. Once the field names 0.13.0 or newer, provenance raises it no further.
Skill type
Section titled “Skill type”trailguide-skill-type labels the skill as a playbook or a review; see Skill types. Leave it out when neither fits. The type is a plain label: Trailguide installs, checks, and updates every skill the same way, whatever its type.
The canonical type list is canonical-skill-types.yaml in the Trailguide repository. Each Trailguide release builds the list in, so a new type needs a Trailguide release, and your library’s CI must use that release before a skill can declare the type. Only trailguide library check checks the type: a project installs a skill whose type its Trailguide doesn’t know without complaint, and shows the type as written.
Rules a skill applies
Section titled “Rules a skill applies”trailguide-rules-used lists the rules the skill applies, one library rule ID per line, in a YAML block string:
metadata: trailguide-rules-used: | practices/architecture/decide-module-boundaries-first practices/testing/test-behavior-not-implementation practices/verification/verify-on-the-surface-users-touchIn a library, each line is a rule ID in this library: the rule’s path in rules/ without .md, and without a source name, because each project chooses its own source names. Surrounding whitespace and blank lines are ignored. Each ID can appear once. A library’s skill can cite rules from any rule group in its library, and only rules in its library. A skill in a repository that isn’t a library can also cite its sources’ rules by project ID; see Skills in a project.
When a project installs the skill, Trailguide takes every cited rule, even ones the project’s rule include doesn’t name, and appends a generated section to the installed SKILL.md that links to the project’s version of each one. Cited rules are for reference only: they never join RULES.md. See Installed copies.
Skills a skill uses
Section titled “Skills a skill uses”trailguide-skills-used lists the other skills this skill calls, one skill ID per line, in the same form:
metadata: trailguide-skills-used: | skills/architect skills/tddEach line is a skill ID in the same repository, skills/<name>. A skill can’t call itself, and the skills called can’t form a cycle, directly or through other skills. When a project installs the skill, Trailguide also installs every skill it calls, and the skills those call in turn, from the same repository and revision. A project declares calls a skill’s metadata leaves out with skills.uses; Trailguide doesn’t search skill text for them.
A library’s skill can also call a skill the library curates, by the ID the library’s manifest lists it under, such as anthropic:skills/skill-creator:
metadata: trailguide-skills-used: | anthropic:skills/skill-creatorThe manifest must declare the skill’s source, here anthropic. A curated skill that no level lists becomes a dependency, which projects install only with the skills that use it. In a library of library schema version 2, library.skills must list it, at a level or as a dependency. When a project installs the calling skill, Trailguide also installs the curated skill, from the repository the library curates it from, at the commit the project resolves for that repository, as it installs any curated skill, whatever level the library gives it. A curated skill brings the skills it calls in its own repository, but not skills that repository curates in turn.
Text agents show
Section titled “Text agents show”Some agents show a skill in their interface with its own display name, a short description, and a prompt that starts it. Three optional metadata keys hold that text, without naming an agent:
metadata: display-name: "Add Skill" short-description: "Create and place Fabrica agent skills" default-prompt: "Use $add-skill to create or update a Fabrica agent skill."| Key | Value |
|---|---|
display-name | The name the interface shows for the skill, such as Add Skill. |
short-description | A short line about the skill, for lists. Agents still choose the skill by its description. |
default-prompt | A prompt that starts the skill, such as Use $add-skill to create or update a Fabrica agent skill. |
Each value is a string; a value that isn’t one fails like any other unreadable frontmatter. Trailguide maps the keys into the file each agent reads. Today that’s Codex, which reads agents/openai.yaml in the skill folder: when a project installs the skill, Trailguide writes that file into the copy in .agents/skills/ only, with interface.display_name, short_description, and default_prompt. The display name falls back to the skill’s install name, a key the skill leaves out stays out of the file, and a skill that sets none of the keys gets no file. When a project gives the skill an alias, each $<name> mention of the skill’s own name in these values becomes $<install-name>, so the prompt starts the skill as installed:
# Generated by Trailguide from the display-name, short-description, and default-prompt metadata in SKILL.md. Do not edit.interface: display_name: "Add Skill" short_description: "Create and place Fabrica agent skills" default_prompt: "Use $add-skill to create or update a Fabrica agent skill."The keys cover only this text. To set anything else Codex reads from agents/openai.yaml, such as icons, tool dependencies, or policy.allow_implicit_invocation, ship the file in your skill folder. A skill that ships its own file, such as a third party’s skill you install or curate, keeps it unchanged in every copy, and Trailguide generates nothing for it, whatever its metadata says. Mentions of the skill’s name in your own file aren’t changed when a project renames the skill.
When your skill’s agents/openai.yaml sets only interface.display_name, short_description, or default_prompt, trailguide library check warns and suggests the metadata keys instead, so the file isn’t tied to one agent. It doesn’t warn about a file with any other setting.
Links in a library’s skills
Section titled “Links in a library’s skills”In a library of library schema version 3, a skill’s Markdown can link to web pages, to its own files, to shared files, and to other skills, each as a path relative to the file it’s in, so it works while you read skills/src/. Library build rewrites each link so it works in the built skill:
- A link inside the skill’s folder, such as
references/slicing.md, stays as written. - A link to a file or folder in
skills/src/shared/, or in theshared/folder of the skill’s own stack, such as../../shared/verify.sh, copies what it names into the built skill under its own name at the top of the skill’s folder, such asverify.sh, and points there. A link to a shared folder copies the whole folder. - A link to another skill’s file, in its stack or anywhere else in
skills/src/, points at that skill’s built folder beside it inskills/dist/, such as../review-tests/SKILL.md.
Library build follows links in the Markdown files it copies in, too, so a shared checklist can link to another shared file. External URLs, links that start with # or ?, and other addresses with a scheme stay as they are. trailguide library check fails, naming each link, when one names a file that doesn’t exist, a skill’s README.md, which never ships, another stack’s shared/ folder, or a file outside skills/src/, such as a rule: a built skill can’t take that file with it. Move the file into a shared folder, or link a web address. Two copies, or a copy and one of the skill’s own files, with the same name in the built skill also fail; rename one. A skill cites the rules it applies with trailguide-rules-used, and a project’s installed copy links to the project’s version of each one.
Projects install the built skills, which link only to their own files and to each other, so a project keeps no other file of the library for them.
Links in a project’s skills
Section titled “Links in a project’s skills”In a project, and in a library of library schema version 2, a skill’s Markdown can link to web pages, to its own files, and to other files in its repository: a sibling skill it compares itself with, a shared checklist in assets/, or a diagram outside .trailguide/. Write each link as a path relative to the file it’s in, so it works while you read the repository. In a project, whose skills sit in .trailguide/skills/<name>/, that’s references/slicing.md, ../redesign/SKILL.md for another skill, ../../assets/review-checklist.md for a file in .trailguide/assets/, or ../../../docs/schema.md for one at the repository root. In a library of schema version 2, whose skills sit one folder deeper, in an origin folder, it’s ../redesign/SKILL.md for a sibling in the same origin folder, ../../pstack/show-me-your-work/SKILL.md for one in another, and ../../../assets/review-checklist.md. Installed copies keep working too: when a project installs the skill, Trailguide keeps a copy of every file its links reach, from the same revision, and changes the installed links to point at those copies. See Links.
Trailguide reads Markdown links, images, and reference definitions in every Markdown file of the skill, and in every Markdown file those links reach, so a link from a linked file is kept too. Links in inline code, code blocks, and prose aren’t links, and links in raw HTML aren’t followed. External URLs, links that start with # or ?, and other addresses with a scheme, such as mailto:, stay as they are and are never downloaded. Files other than Markdown, such as scripts, aren’t read for links.
A local link must name a file in the skill’s repository. It fails when it names:
- A file the revision doesn’t have.
- A folder, a symbolic link, or a submodule.
- An absolute path, a path that leaves the repository, or one with backslashes.
- A rule file, or another file in
.trailguide/that isn’t in a skill folder orassets/. Cite rules withtrailguide-rules-usedinstead, and the installed copy links to the project’s version of each one.
A linked file can be anywhere else in the repository, including a folder at the repository root that has the name of one in .trailguide/, such as assets/notes.md. A project keeps each linked file from outside .trailguide/ under _repository/ in its copy of the library, at its path from the repository root, so it never takes the place of one of the library’s own files. A linked file outside the skill folder isn’t a skill: a project keeps it to read and never installs it in an agent’s skills folder. That holds for a sibling skill a project excludes too: the project keeps the files the link reaches for reading, without installing the skill, and warns about it.
A project’s own skills, in its .trailguide/skills/, including forks that replace a source’s skill, follow the same rules, checked against the project’s files as the command leaves them, with or without skill targets. A link to a sibling folder, such as ../review/SKILL.md, names the skill the project installs as review: its own skill or fork in .trailguide/skills/review/, or, when it has none, the skill a source installs under that name, so a fork keeps its links to its source’s skills that the project installs. A link into a skill target folder, such as ../../../.claude/skills/review/SKILL.md, must also name a skill the command installs, and a link into .trailguide/vendor/ fails, since sync replaces those files. A link to a file Trailguide generates, such as .trailguide/SKILLS.md, must name one the command writes; Trailguide writes that file’s own links, so the check doesn’t follow them. Their installed links point at the project’s file where it is, or at the installed copy of another of the project’s skills. When a linked file changes while the command runs, it fails with concurrent-change and writes nothing.
Overview page
Section titled “Overview page”A library’s skill or stack can have an overview page: a short page for people deciding whether to use it, which catalogs such as Skillmart show as its Overview tab. It’s overview.md in the skill’s or stack’s source folder, with YAML front matter followed by Markdown, and the images and video it shows are in the folder’s media/ folder. Neither ships in a built skill, and a project doesn’t read them. Write the overview page explains what to put on it.
---tagline: Let your agent do more on its own by verifying its own work.summary: Let agents prove their changes on the running app.cover: media/slide-1.pngvideo: file: media/demo.mp4 poster: media/demo-poster.png captions: media/demo.vtt title: Generate a verify skill and prove a feature with itgallery: - file: media/slide-1.png alt: A bar chart in which writing a change takes an agent minutes and proving it takes a person much longer caption: Agents write code in minutes. Checking it is now the slow part.---
Generate a verify skill for your project, so any agent can prove its work on your running app.
## Why it exists...| Field | Meaning |
|---|---|
tagline | Required. The page’s headline: one line of up to 120 characters. |
summary | Optional. One line of up to 100 characters that cards and lists show instead of the skill’s SKILL.md description. Without it, they show the tagline. |
cover | Optional. The image cards and lists show. Without it, the cover is the video’s poster, or else the first gallery image, or none. |
video | Optional. file, an MP4 or WebM video of at most 10 MB, and poster, the image shown before it plays, are required; captions, a WebVTT file of at most 1 MB, and title, a line that says what it shows, are optional. |
gallery | Optional. 1 to 12 slides or screenshots, in order. Each has a file, alt text that says what it shows, and an optional one-line caption. |
The Markdown after the front matter must not be blank: its first paragraph is the page’s pitch, and its ## sections follow. Images in it need alt text, as in a README.md.
Every file the page names, and every local image its Markdown shows, is a path relative to overview.md that must be in media/, with its kind’s extension, in lowercase: .png, .jpg, .jpeg, .webp, or .gif for an image, .mp4 or .webm for a video, and .vtt for captions. Each file must also hold what its extension says, and images are at most 2 MB. Write images in Markdown: check fails on an HTML <img> tag, which it can’t verify. As in a README, an image on the web passes check; catalogs decide which hosts they load images from, so keep the page’s images in media/. The front matter takes no other keys; duplicate keys, anchors, aliases, and explicit tags are rejected, as in SKILL.md.
overview.md and media/ are reserved names in every skill folder of a library of library schema version 3: a skill can’t ship a file of either name, and a link to one from a file that ships fails the build. trailguide library add skill writes a starter page, with --overview or when the library’s skills.overviewPages is required, with the trailguide:draft marker, which fails check until you write the page and remove the marker, or, unless pages are required, delete the file. Releases of Trailguide before 0.14.0 ship overview pages in the built skills, so while minTrailguideVersion names a release before 0.14.0, or none, a release of trailguide library build raises it to its own version the first time the sources have a page other than a starter page, or a file in a media/ folder; see library build. Library check fails with stale-build while the minimum still admits a release before 0.14.0, so a development build, which never raises it, leaves it to you.
Set skills.overviewPages in .trailguide/library.yaml to decide how much the library cares about overview pages: required when every skill and stack needs one, such as for a library you publish to a catalog; optional, the default, when pages are welcome but not needed; and off when the library has no use for them, so check and library add skill never prompt you or your agents to write one. Check validates every page the library has, whatever the setting.
A skill without an overview page still has an Overview tab in Skillmart: the opening section of its README.md, up to the first ## heading, or its ## Overview section if it has one.
Licenses
Section titled “Licenses”A library’s license, declared in its manifest, covers its skills as it covers its rules. The license field in SKILL.md is informational: Trailguide preserves it, and when it differs from the library’s SPDX expression, trailguide library check warns. Skills from a non-library source have no library declaration, so their license comes from the skill or the repository instead. See License rules.
Validation
Section titled “Validation”trailguide library check validates every skill in the library, whatever a project selects. It reports every skill problem it finds, one per line, each starting with the file or folder it’s about, and fails with the code invalid-skill. The examples below are from a library of library schema version 3; in a library of version 2, each location starts with skills/<origin>/ instead, such as skills/engineering/build-feature/SKILL.md:
$ trailguide library checkError: skills don't pass library check: - skills/src/skills/build-feature/SKILL.md: trailguide-rules-used names practices/testing/test-behaviour-not-implementation, which isn't a rule in this library - skills/src/skills/build-feature/SKILL.md: trailguide-skills-used names skills/tdd-loop, which isn't a skill in this library - skills/src/skills/build-feature/SKILL.md: trailguide-skill-type is design; use playbook or review, or leave it outIn a library of library schema version 3, check first refuses content left in .trailguide/, then builds skills/src/ in memory, compares the build with skills/dist/, checks each skill’s README.md and each skill’s and stack’s overview page, then checks the skills themselves, and finally, while the sources have overview pages or media, that minTrailguideVersion names 0.14.0 or newer. It stops at the first of these steps that fails, so fix what it names and run it again:
| Problem | Message |
|---|---|
A file or folder skills/src/ doesn’t define | skills/src/notes.md: skills/src/ holds only skills/, stacks/, and shared/; move it into one of them, or delete it |
A file directly in skills/src/skills/ | skills/src/skills/notes.md: skills/src/skills/ holds only a folder for each standalone skill; move the file into a skill's folder, or into skills/src/shared/ |
A file directly in skills/src/stacks/ | skills/src/stacks/notes.md: skills/src/stacks/ holds only a folder for each stack; move the file into a stack's folder |
A file or folder a stack doesn’t define, such as a misspelled skills/ | skills/src/stacks/delivery/skils: stack delivery holds only README.md, overview.md, media/, skills/, and shared/; move it into one of them, or delete it |
A file directly in a stack’s skills/ | skills/src/stacks/delivery/skills/notes.md: the skills/ folder of stack delivery holds only a folder for each of its skills; move the file into a skill's folder, or into the stack's shared/ folder |
| A stack or skill folder name that breaks the name grammar | skills/src/skills/Build_Feature: a skill's folder name is its name, which uses 1 to 64 lowercase letters, digits, and hyphens, without a leading, trailing, or doubled hyphen; rename it |
A skill folder without SKILL.md | skills/src/skills/build-feature: missing SKILL.md; each folder in a skills/ folder is a skill. Add its SKILL.md, or move the folder out |
| Two skills with the same name, in different stacks or outside one | skills/src/stacks/delivery/skills/review: already a skill named review at skills/src/skills/review, and a skill's name is its ID; rename one of them |
| A link to a file that doesn’t exist | skills/src/skills/build-feature/SKILL.md: the link to ../../shared/missing.md names skills/src/shared/missing.md, which doesn't exist; fix the link, or add the file |
A link to another skill’s folder, not its SKILL.md | skills/src/skills/build-feature/SKILL.md: the link to ../review/ names the folder of skill review, which library check can't follow; link its SKILL.md instead |
A link to a skill’s README.md | skills/src/skills/build-feature/SKILL.md: the link to README.md names the skill's README.md, which stays in skills/src/ and never ships; link a file that ships, or a web address |
A link to another stack’s shared/ folder | skills/src/skills/build-feature/SKILL.md: the link to ../../stacks/delivery/shared/verify.sh names skills/src/stacks/delivery/shared/verify.sh, in the shared/ folder of stack delivery, which only that stack's skills can use; move it to skills/src/shared/, or link a web address |
A link to a file outside skills/src/, such as a rule | skills/src/skills/build-feature/SKILL.md: the link to ../../../../rules/practices/testing/verify-retries.md leaves skills/src/ for rules/practices/testing/verify-retries.md, which a built skill can't take with it. Move it into skills/src/shared/ and link it there, or link a web address |
| Two shared copies with the same name in one skill | skills/src/skills/build-feature: the build copies in both skills/src/shared/checklist.md and skills/src/stacks/delivery/shared/checklist.md, which the skill links to, as checklist.md; rename one of them |
An image in a skill’s README.md without alt text | skills/src/skills/build-feature/README.md: the image images/dashboard.png has no alt text; describe what it shows, as in  |
An HTML <img> tag in a skill’s README.md, outside code | skills/src/skills/build-feature/README.md: an HTML <img> tag shows an image that library check can't verify; write it in Markdown, as in  |
| An image outside the skill’s folder, missing, or larger than 2 MB | skills/src/skills/build-feature/README.md: the image ../../shared/logo.png is outside the skill's folder; keep the images its README.md shows in skills/src/skills/build-feature |
A link from a shipped file to the skill’s overview.md or into its media/ folder | skills/src/skills/build-feature/SKILL.md: the link to media/demo.mp4 names skills/src/skills/build-feature/media/demo.mp4, in the skill's media/ folder, which holds its page's images and video and never ships; move the file out of media/, or link a web address |
| An overview page without a tagline, with a key it doesn’t define, or without Markdown after its front matter | skills/src/skills/build-feature/overview.md: expected a tagline: one line that says what the skill does for its reader |
A starter overview page that still has its trailguide:draft marker | skills/src/skills/build-feature/overview.md: it's still the starter page; write its tagline, pitch, and media, then remove its trailguide:draft marker, or delete overview.md |
A file an overview page names that isn’t in media/, or doesn’t have its kind’s extension | skills/src/skills/build-feature/overview.md: cover: shot.png isn't in media/; keep the page's images and video in its media/ folder |
| A file an overview page names that doesn’t exist | skills/src/skills/build-feature/overview.md: gallery[0] names media/tree.png, which doesn't exist in skills/src/skills/build-feature/, or Git ignores it |
| A file an overview page names whose extension has capital letters | skills/src/skills/build-feature/overview.md: cover: media/cover.PNG has the extension .PNG; rename it to end in .png, since catalogs serve the page's files by their extension |
| An overview page’s video that isn’t an MP4 or WebM, or is larger than 10 MB | skills/src/skills/build-feature/overview.md: video.file names media/demo.mp4, which isn't an MP4 or WebM video; encode it as MP4 with H.264, or as WebM |
| A file an overview page names that’s a Git LFS pointer | skills/src/skills/build-feature/overview.md: video.file names media/demo.mp4, which is a Git LFS pointer; skills/src/ holds files in Git itself, so commit the file without LFS |
An HTML <img> tag in an overview page, outside code | skills/src/skills/build-feature/overview.md: an HTML <img> tag shows an image that library check can't verify; write it in Markdown, as in  |
| An overview page’s image that isn’t a PNG, JPEG, WebP, or GIF, or is larger than 2 MB | skills/src/skills/build-feature/overview.md: video.poster names media/poster.png, which is larger than 2 MB; shrink it to 2 MB or less |
| An overview page’s captions that aren’t WebVTT | skills/src/skills/build-feature/overview.md: video.captions names media/demo.vtt, which isn't a WebVTT file; it starts with WEBVTT and ends in .vtt |
A built skill that isn’t what its source builds, with code stale-build | skills/dist/build-feature/ isn't what skills/src/skills/build-feature/ builds. Edit the source, not the built folder |
A built skill without a source, with code stale-build | skills/dist/old-skill/ has no source in skills/src/ |
A skills index that isn’t what build writes, with code stale-build | skills/README.md is missing or out of date |
A skill or stack without an overview page while skills.overviewPages is required | skills.overviewPages in .trailguide/library.yaml is required, but these have no overview page: and a line for each skill and stack |
skills.overviewPages set while minTrailguideVersion admits a release before 0.14.0, with code stale-build | .trailguide/library.yaml sets skills.overviewPages, which releases of trailguide before 0.14.0 reject, but its minTrailguideVersion is 0.13.0, so the library's check workflow would fail. |
Overview pages or media while minTrailguideVersion admits a release before 0.14.0, with code stale-build | skills/src/ has overview pages, which releases of trailguide before 0.14.0 would ship in the built skills, but minTrailguideVersion in .trailguide/library.yaml is 0.13.0. |
Content left in .trailguide/rules/, .trailguide/assets/, or .trailguide/skills/, with code nested-content | .trailguide/skills/ isn't empty, but a library of library schema version 3 keeps that content in skills/src/ and reads nothing from .trailguide/skills/. Move there what isn't there yet, fix the relative links that leave it, remove .trailguide/skills/, and run trailguide library build; trailguide library migrate only moves a library of library schema version 2. |
In every library, check fails with these problems. Rows about origin folders and .trailguide/skills/ apply to a library of library schema version 2, which gets the same checks of the library.skills section of its config.yaml, plus checks that each skill its dependencies list names is used:
| Problem | Message |
|---|---|
| Two skills the library publishes, authored or curated, with the same name | projects would install skills/review and mattpocock:skills/review both as review; publish only one of them, give the curated skill an alias in skills.aliases, or rename the folder of your own skill |
| A skill listed in more than one level | .trailguide/library.yaml: skills.recommended[0]: skills/fix-bug is already required; give each skill one level |
An offered or dependencies list | .trailguide/library.yaml: skills.offered: library schema version 3 has no offered list: every skill of the library's own that no level lists is available to projects, and a curated skill reaches them when a level lists it or the library's skills use it. Remove offered, and list a curated skill you want projects to choose in recommended |
| A listed skill that doesn’t exist | .trailguide/library.yaml: skills.recommended: skills/fix-bugs names no skill of the library, because skills/dist/ has no skill named fix-bugs; add the skill, or remove it from the list |
A curated skill whose source isn’t in sources | .trailguide/library.yaml: skills.recommended[0]: mattpocock:skills/review comes from mattpocock, which isn't a source in sources; add sources.mattpocock with the repository the skill comes from, and a ref unless the repository publishes library releases |
A curated skill the source doesn’t have at its ref | skills.recommended names mattpocock:skills/productivity/grill, which mattpocock doesn't have at main; check the skill ID, or set sources.mattpocock.ref to a revision that has it |
| An alias of a skill the library doesn’t publish | .trailguide/library.yaml: skills.aliases.mattpocock:skills/review: skills.aliases gives mattpocock:skills/review an alias, but the library doesn't publish it: no level lists it, and neither the library's skills nor the curated skills it publishes use it. Remove the alias, or list the skill in recommended |
A file directly in skills/, other than README.md | skills/notes.md: skills/ holds a folder for each origin, each holding skill folders, and its README.md; move this file into a skill's folder |
A skill folder directly in skills/ | skills/build-feature: a skill's folder sits in the folder for its origin, so move it to skills/engineering/build-feature/ |
| An origin folder named for neither the library nor a source it forks from | skills/acme: an origin folder is named for the repository's own skills, engineering, or for a source a fork comes from; move its skills to the folder for their origin |
| A file directly in an origin folder | skills/engineering/notes.md: an origin folder holds only skill folders; move this file into a skill's folder |
| A folder name that breaks the name grammar | skills/engineering/Build_Feature: a skill's folder name is its name, which uses 1 to 64 lowercase letters, digits, and hyphens, without a leading, trailing, or doubled hyphen; rename the folder |
A skill folder without SKILL.md | skills/engineering/build-feature: missing SKILL.md; each folder in an origin folder is a skill, so add its SKILL.md or move the folder out of skills/ |
| Two skills with the same name in different origin folders | skills/pstack/build-feature: skills/engineering/build-feature is also a skill named build-feature, and a skill's name is its ID, skills/build-feature; rename one of them |
| A fork outside its source’s folder | skills/engineering/show-me-your-work: this skill forks a skill of the source pstack, so it sits in that source's folder; move it to skills/pstack/show-me-your-work/ |
| A skill in a source’s folder that forks none of its skills | skills/pstack/review: this skill forks no skill of the source pstack, so it's one of the repository's own skills; move it to skills/engineering/review/, or record the fork in sources.pstack.skills.forks |
| A skill inside another skill’s folder | skills/src/skills/build-feature/steps/SKILL.md: a skill folder can't contain another skill; move it to its own folder in skills/ |
| Rule group metadata in a skill folder | skills/src/skills/build-feature/_group.yaml: a skill folder can't contain group metadata |
| A symbolic link, submodule, or Git LFS pointer | skills/src/skills/build-feature/scripts/verify.sh: symbolic links, submodules, and Git LFS pointers aren't supported in a skill folder |
| A Markdown file that isn’t UTF-8 | skills/src/skills/build-feature/references/slicing.md: expected UTF-8 Markdown |
No frontmatter at the start of SKILL.md | skills/src/skills/build-feature/SKILL.md: expected YAML frontmatter at the start of the file |
| Invalid YAML, such as a duplicate key or an alias | skills/src/skills/build-feature/SKILL.md: followed by the YAML problem and its line |
| A blank body | skills/src/skills/build-feature/SKILL.md: expected instructions after the frontmatter |
| An unfinished draft | skills/src/skills/build-feature/SKILL.md: complete the draft and remove its trailguide:draft marker |
| An unknown top-level field | skills/src/skills/build-feature/SKILL.md: unknown field version; SKILL.md accepts name, description, license, compatibility, allowed-tools, and metadata |
A missing or blank name or description | skills/src/skills/build-feature/SKILL.md: description is required |
A name that differs from the folder name | skills/src/skills/build-feature/SKILL.md: name is build-features, but the folder is build-feature; they must match |
A description over 1,024 characters | skills/src/skills/build-feature/SKILL.md: description is 1,310 characters; use at most 1,024 |
A compatibility over 500 characters, or blank | skills/src/skills/build-feature/SKILL.md: compatibility is 612 characters; use at most 500 |
A field or metadata value that isn’t a string | skills/src/skills/build-feature/SKILL.md: metadata.trailguide-skill-type must be a string |
| A provenance key in a skill’s source | skills/src/skills/build-feature/SKILL.md: metadata.trailguide-stack is written by Trailguide into the copies of a skill it builds and installs; remove it from the skill's source |
A reserved trailguide- key Trailguide doesn’t define | skills/src/skills/build-feature/SKILL.md: metadata.trailguide-groups isn't a Trailguide key; use trailguide-skill-type, trailguide-rules-used, or trailguide-skills-used |
| A type that isn’t on the canonical list | skills/src/skills/build-feature/SKILL.md: trailguide-skill-type is design; use playbook or review, or leave it out |
| A cited rule that doesn’t exist | skills/src/skills/build-feature/SKILL.md: trailguide-rules-used names practices/testing/test-behaviour-not-implementation, which isn't a rule in this library |
A cited rule with a source name or .md | skills/src/skills/build-feature/SKILL.md: trailguide-rules-used names fabrica:practices/testing/test-behavior-not-implementation; cite a rule by its ID in this library, such as practices/testing/test-behavior-not-implementation |
| A cited rule that a library release or a pending change note retired, with a replacement | skills/src/skills/build-feature/SKILL.md: trailguide-rules-used names practices/testing/check-retry-backoff, which is retired and replaced by practices/testing/verify-retries; cite the replacement |
| A cited rule that was retired without a replacement | skills/src/skills/build-feature/SKILL.md: trailguide-rules-used names practices/code-design/comment-intent, which is retired; remove it |
| An ID listed twice | skills/src/skills/build-feature/SKILL.md: trailguide-rules-used names practices/testing/verify-retries twice |
| A used skill that doesn’t exist | skills/src/skills/build-feature/SKILL.md: trailguide-skills-used names skills/tdd-loop, which isn't a skill in this library |
| A used curated skill from a source the manifest doesn’t declare | skills/src/skills/add-skill/SKILL.md: trailguide-skills-used names anthropik:skills/skill-creator, but .trailguide/library.yaml declares no source named anthropik; add sources.anthropik with the repository the skill comes from, or correct the source name: the library declares anthropic |
A used curated skill the source doesn’t have at its ref | skills/src/skills/add-skill/SKILL.md: trailguide-skills-used: skills/add-skill names anthropic:skills/skill-creatr in trailguide-skills-used, which anthropic doesn't have at main; check the skill ID, or set sources.anthropic.ref to a revision that has it |
| A curated skill named without its source name | skills/src/skills/add-skill/SKILL.md: trailguide-skills-used names skills/skill-creator, which isn't a skill in this library; the library curates anthropic:skills/skill-creator, so name it that way |
| A used skill that is retired | skills/src/skills/build-feature/SKILL.md: trailguide-skills-used names skills/triage-bug, which is retired and replaced by skills/fix-bug; use the replacement, or which is retired; remove it when nothing replaces it |
| A skill that uses itself | skills/src/skills/build-feature/SKILL.md: trailguide-skills-used names the skill itself |
| Skills that use each other in a cycle | skills/src/skills/build-feature/SKILL.md: trailguide-skills-used forms a cycle: skills/build-feature -> skills/tdd -> skills/build-feature |
A local link to a file the library doesn’t have, including one Git ignores, or a link from a file a skill’s links reach, with code reference-missing | .trailguide/skills/engineering/build-feature/SKILL.md: links to references/slices.md (.trailguide/skills/engineering/build-feature/references/slices.md), which the library doesn't have. Add the file, or fix the link; projects that install the skill keep a copy of every file its links reach. |
A link to a folder, a symbolic link, a rule file, or another file a project can’t keep, with code reference-unsupported | .trailguide/skills/engineering/build-feature/SKILL.md: links to ../../../rules/practices/testing/verify-retries.md (.trailguide/rules/practices/testing/verify-retries.md), which is a file in .trailguide/ that isn't a skill's file or a shared asset in .trailguide/assets/, such as a rule, which installed skills cite instead of linking. Cite a rule with trailguide-rules-used instead of linking to it, or move the file out of .trailguide/. |
An absolute link, or one that leaves the repository, with code reference-escapes | .trailguide/skills/engineering/build-feature/SKILL.md: links to /etc/checklist.md, which is an absolute path, so it depends on where the files are read rather than on the repository. Link with a path relative to the file. |
| A skill that reuses the ID of a retired skill | skills/triage-bug reuses the ID of a skill that release/5 retired. Retired IDs can't be reused; give the skill a new ID. |
After the first library release, check also compares every skill with the latest library release and fails, with the code change-notes, when a skill’s change notes don’t match its changes, exactly as for rules. See Change notes and library check.
Check warns, without failing, when:
- A skill’s
licensediffers from the library’s declared SPDX expression:skills/src/skills/build-feature/SKILL.md: license is Apache-2.0, but the library declares MIT. The library's license applies to its skills; make them match. - A skill declares a
licenseand the library declares none:skills/src/skills/build-feature/SKILL.md: license is MIT, but the library declares no license. Declare the library's terms in library.license. - A file in a skill folder is neither tracked nor ignored by Git:
skills/build-feature/scripts/new-check.sh isn't tracked by Git, so it isn't part of the skill. Add it with git add, or ignore it. - A skill ships its own
agents/openai.yamlthat sets only the text the metadata keys generate:skills/add-skill/agents/openai.yaml: it sets only interface text, which Trailguide generates for each project from SKILL.md. Set metadata.display-name, short-description, and default-prompt in SKILL.md instead, then delete this file.See Text agents show. - A skill or stack has no overview page, naming the first five and counting the rest:
No overview page yet for skills/src/skills/build-feature, skills/src/stacks/delivery. Add an overview.md to each, so catalogs such as Skillmart can show what it does and why, or set skills.overviewPages in .trailguide/library.yaml to off: https://trailguide.fabricahq.com/guides/write-skills/#write-the-overview-page. Withskills.overviewPagesset tooff, check doesn’t note them, and set torequired, it fails instead.
To find curated skills’ names, check reads each curated source at its ref, so it needs access to those repositories.
Check validates the format, not whether the steps are good. Use Write a skill to review a skill’s guidance.
Installed copies
Section titled “Installed copies”When a project installs a skill, Trailguide writes a copy of its folder into the folder each agent in skills.installFor reads, such as .claude/skills/build-feature/. Every file is copied as the source has it, with its executable bit, and SKILL.md gets two changes, plus a new name when the project gives the skill an alias, and, for the project’s own fork, trailguide-forked-from in its metadata:
-
A marker comment becomes the first line after the frontmatter, so the frontmatter still starts the file:
<!-- trailguide:installed fabrica:skills/build-feature 1.3.0. Do not edit; trailguide project sync replaces this copy. --> -
When the skill cites rules, a generated Rules this skill applies section is appended at the end. It links to the project’s version of each rule the skill cites, including an authored rule that replaces one, and marks a rule the project excluded. A Skills this skill uses line follows when the skill calls others.
The copy in .agents/skills/ also gets a generated agents/openai.yaml when the skill sets interface text and doesn’t ship that file itself.
Don’t edit installed copies: sync rewrites them, and trailguide project check fails when one differs from what sync would write. Installed skills shows the complete generated section and how Trailguide records the folders it owns.
Skills in a project
Section titled “Skills in a project”A repository that isn’t a library authors skills, and its forks, in .trailguide/skills/<name>/, with the same format, and two differences:
- They can cite rules and call skills from the project’s sources, by project ID with the source name, because a project can use several sources:
fabrica:practices/testing/test-behavior-not-implementationorfabrica:skills/tdd. Bare IDs, such aspractices/architecture/follow-bounded-contexts, name the repository’s own rules and skills. Trailguide takes each cited rule, and installs each called skill, from the source it names. - They have no versions and need no change notes.
trailguide project create skill creates one, and trailguide project fork skill forks a skill from a source into one; see project create skill. Sync and build validate these skills with the checks above and fail on the first problem. trailguide project check also fails when one cites a rule its library retired, naming the replacement when there is one, so a project’s skills never point at a rule that’s gone.
Skills from non-library sources
Section titled “Skills from non-library sources”A repository without a library manifest, such as a third party’s skill collection, can supply skills too. Each folder in it that has a SKILL.md file is a skill, and its ID is the folder’s path from the repository root, such as skills/engineering/to-spec. Trailguide checks these skills leniently: where a skill breaks this format, such as a name that doesn’t match its folder or a missing description, sync warns and installs the skill as it is. The checks that protect your project still fail: unsafe paths, links the project can’t keep working, symbolic links, submodules, Git LFS pointers, and the source limits. A non-library source’s trailguide-rules-used lists are ignored, because it has no rules. Its trailguide-skills-used lists name skills in the same repository; the project declares calls they leave out with skills.uses. See Non-library sources.
Related pages
Section titled “Related pages”- Skill explains what a skill is and how it relates to rules.
- Write a skill walks through writing, checking, and versioning a skill.
- Library schema covers where skills live in a library.
- Rule and skill versions defines what a skill version covers.