Skip to content

Authoring Skills

Authoring a skill is as simple as creating a standard Starlight documentation page and adding a few specific fields to its frontmatter.

By declaring skill: true in the frontmatter of any document page, you mark that page as an AI Skill. The marked page continues to function as a normal documentation page for humans, but it will also be processed as a skill during the build.

The body of the page is distributed directly as the body of the skill. We do not provide a mechanism to filter the body text solely for AI usage—you maintain a single source of truth.

You must define your skills using the frontmatter of your Markdown or MDX file:

FieldRequiredDescription
skillYesSet to true to mark the page as a skill.
descriptionYesA human-readable summary. Used for the visual catalog page and the exported AI skill metadata.
titleRecommendedThe page title. Used to auto-derive the skill name if not specified.
skill-nameNoExplicit mechanical identifier for the skill (1 to 64 characters, lowercase alphanumeric and hyphens only). If not provided, it is derived from the title.
skill-categoryNoExplicit category path separated by / (e.g., development/frontend).
skill-licenseNoLicense name or reference (e.g., MIT).
skill-compatibilityNoEnvironment compatibility details (max 500 characters).
skill-metadataNoAny arbitrary key-value pairs to add to the exported skill metadata.
skill-allowed-toolsNoA space-separated verbatim string of pre-approved tool identifiers for the agent.

(Note: Companion files and schema references are supported via the subfiles field. See the Companion Files chapter for detailed usage.)

Here is a full-size example of what a skill page’s frontmatter might look like:

---
title: "React Component Guidelines"
description: "Rules and best practices for creating new React components in this project."
skill: true
skill-name: "react-components"
skill-category: "frontend/react"
skill-license: "MIT"
skill-compatibility: "React 18.x with TypeScript"
skill-allowed-tools: "Bash(git:*) Read Write"
skill-metadata:
version: "1.2.0"
author: "Frontend Team"
subfiles:
- "schemas/component.json"
---

Skill names are machine-readable identifiers and must be unique across the site. Duplicate skill names will result in a build error.

  • Allowed characters: Lowercase letters (a-z), numbers (0-9), and hyphens (-).
  • Length: 1 to 64 characters.
  • Constraints: Cannot begin or end with a hyphen. Cannot contain consecutive hyphens (--).

Categories dictate how your skills are grouped in the sidebar and catalog. The category is determined in this order:

  1. skill-category inside the frontmatter.
  2. Auto-derived from the file path if autoCategoryMode is enabled.
  3. Empty string (Uncategorized).

A machine-readable JSON Schema for all frontmatter fields is available as a companion file: _assets/skill-frontmatter.schema.json.

Use this schema to validate frontmatter values programmatically or to understand the exact constraints (allowed characters, length limits, required fields) for each field without reading prose documentation.