Skip to content

Skill Format Specification v1

Status: Stable Spec Version: 1 Last Updated: 2026-03-20

This document is the formal specification for the .skillr/ skill format. Implementations MUST conform to this spec to ensure interoperability across the Skillr CLI, web UI, and third-party tools.

The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in this document are to be interpreted as described in RFC 2119.

1. Directory Structure

A Skillr-managed project MUST contain a .skillr/ directory at the project root with the following structure:

project-root/
  .skillr/
    manifest.json
    skills/
      simple-skill.md              # flat format
      complex-skill/               # folder format
        skill.md
        gotchas.md
        examples/
          good-output.md

1.1 Manifest

The file .skillr/manifest.json MUST exist and MUST be valid JSON conforming to this schema:

json
{
  "spec_version": 1,
  "id": "uuid-string",
  "name": "project-name",
  "description": "",
  "providers": ["claude", "cursor", "copilot", "windsurf", "cline", "codex"],
  "skills": ["skill-slug-1", "skill-slug-2"],
  "created_at": "2026-03-20T10:00:00Z",
  "synced_at": "2026-03-20T10:05:00Z"
}
FieldTypeRequiredDescription
spec_versionintegerMUSTFormat version. MUST be 1 for this spec.
idstring (UUID)MUSTUnique identifier for the project.
namestringMUSTHuman-readable project name.
descriptionstringSHOULDShort project description.
providersstring[]MUSTProvider slugs to sync to. Valid values: claude, cursor, copilot, windsurf, cline, codex, openai (deprecated), zed, aider, continue, junie.
skillsstring[]SHOULDArray of skill slugs present in skills/.
created_atstring (ISO 8601)SHOULDCreation timestamp.
synced_atstring (ISO 8601) | nullMAYLast sync timestamp. null if never synced.

1.2 Skills Directory

The skills/ directory contains skill definitions in one of two formats:

  • Flat format: {slug}.md — a single Markdown file with YAML frontmatter.
  • Folder format: {slug}/skill.md — a directory containing a main skill file plus optional supplementary files.

Implementations MUST support both formats. The folder format SHOULD be used when a skill has gotchas or supplementary files.

2. Skill File Format

A skill file consists of YAML frontmatter delimited by --- followed by a Markdown body.

markdown
---
id: my-skill
name: My Skill
description: What this skill does
---

The skill body in Markdown.

2.1 Frontmatter

Frontmatter MUST be valid YAML enclosed between two --- delimiters. The opening --- MUST be the first non-whitespace content in the file.

If the file does not start with ---, the entire content MUST be treated as the body with an empty frontmatter object.

If the opening --- exists but no closing --- is found, the entire content MUST be treated as the body with an empty frontmatter object.

2.2 Required Fields

FieldTypeDescription
idstringUnique identifier within the project. MUST match the filename slug.
namestringHuman-readable display name. MUST NOT be empty.

An implementation MUST reject skill files missing id or name with a validation error.

2.3 Optional Fields

FieldTypeDefaultDescription
descriptionstringnullShort summary of the skill's purpose.
categorystring"general"Skill category. See Section 3.
skill_typestringnull"capability-uplift" or "encoded-preference". See Section 4.
modelstringnullTarget LLM model (e.g., claude-sonnet-4-6).
max_tokensintegernullMaximum output tokens for testing.
tagsstring[][]Tags for categorization and filtering.
toolsobject[][]Tool/function definitions in JSON Schema format.
includesstring[][]Slugs of other skills in the same project. See Composition Spec.
template_variablesobject[][]Template variable definitions. See Template Spec.
gotchasstringnullCommon failure points and edge cases.
supplementary_filesobject[][]Additional files in folder-based skills.
conditionsobjectnullConditional activation rules (file patterns, path prefixes).
created_atstring (ISO 8601)auto-setCreation timestamp.
updated_atstring (ISO 8601)auto-setLast modification timestamp.

2.4 Template Variable Definition

Each entry in template_variables MUST have:

FieldTypeRequiredDescription
namestringMUSTVariable name. MUST match [a-zA-Z_][a-zA-Z0-9_]*.
descriptionstringSHOULDWhat this variable represents.
defaultstringMAYDefault value if no override is provided.

2.5 Supplementary File Object

Each entry in supplementary_files:

FieldTypeRequiredDescription
pathstringMUSTRelative path within the skill folder.
contentstringMUSTFile content.

2.6 Conditions Object

FieldTypeDescription
file_patternsstring[]Glob patterns for file-scoped activation (e.g., ["*.py", "tests/**"]).
path_prefixesstring[]Directory prefixes for path-scoped activation.

3. Categories

Valid category values:

ValueDescription
library-api-referenceAPI usage patterns, SDK documentation
product-verificationTesting, QA, validation
data-analysisData processing, analytics, reporting
business-automationWorkflow automation, integrations
scaffolding-templatesCode generation, boilerplates
code-quality-reviewCode review, style enforcement
ci-cd-deploymentBuild pipelines, deployment
incident-runbooksOn-call procedures, troubleshooting
infrastructure-opsInfrastructure management, DevOps
generalDefault catch-all

Implementations SHOULD accept any string value for forward compatibility but MAY warn on unrecognized categories.

4. Skill Types

ValueDescription
capability-upliftTeaches the AI domain knowledge it doesn't have.
encoded-preferenceCaptures behavioral preferences and style rules.

The skill_type field is OPTIONAL. If present, it MUST be one of the two values above.

5. Slugs

Slugs are derived from skill names:

  1. Convert to lowercase
  2. Replace spaces and non-alphanumeric characters with hyphens
  3. Collapse consecutive hyphens
  4. Remove leading and trailing hyphens

Slugs MUST be unique within a project. The slug MUST match the filename (flat format) or directory name (folder format).

6. Body

Everything after the closing --- delimiter is the skill body. The body:

  • MUST be treated as Markdown.
  • MAY contain {{variable}} template placeholders. See Template Spec.
  • MUST be passed verbatim to the model after template resolution.
  • SHOULD use Markdown headings, lists, and code blocks for structure.

7. Folder Format

When a skill uses the folder format, the directory MUST contain skill.md as the main skill file. Additional files are OPTIONAL:

FilePurpose
skill.mdMain skill file (frontmatter + body). REQUIRED.
gotchas.mdCommon failure points. Content overwrites the gotchas frontmatter field.
Any other filesSupplementary files. Collected into supplementary_files array.

The skill.md and gotchas.md filenames are reserved. All other files in the directory are treated as supplementary files.

7.1 Progressive Disclosure

Implementations MAY support 3 levels of skill resolution:

LevelContentUse Case
1"{name}: {description}" (~100 tokens)Agent skill discovery
2Full resolved body with includesStandard compose/sync
3Body + gotchas + supplementary filesDeep context execution

8. Backward Compatibility

This spec guarantees:

  • Flat format skills (v0, pre-spec) MUST continue to work with no changes.
  • The spec_version field in manifest.json is REQUIRED for new projects but OPTIONAL for existing projects (absence implies v1).
  • New optional fields MUST NOT break existing parsers — unknown fields MUST be ignored.

9. File Encoding

All skill files MUST be encoded in UTF-8. Line endings SHOULD be LF (\n). Implementations MUST handle CRLF gracefully.

Released under the MIT License.