Skillbase / spm

SKILL.md Frontmatter Specification

Complete reference for SKILL.md YAML frontmatter and skillbase.json workspace manifest.

Overview

Every skill is a single SKILL.md file with YAML frontmatter (metadata) and a Markdown body (instructions).

For workspace-level dependency management, use skillbase.json — the project manifest analogous to package.json.

SKILL.md Frontmatter

Required fields

FieldTypeDescription
namestringURL-safe slug (lowercase alphanumeric + hyphens)
versionstringSemver version (e.g., 1.0.0)
authorstringAuthor name
licensestringSPDX license identifier
descriptionstringShort description for humans

Required for publishable skills

FieldTypeDescription
languagestringLanguage code (e.g., en)
triggerobjectWhen the AI should use this skill

Name format

Names must be URL-safe slugs matching ^[a-z0-9][a-z0-9-]*$:

  • Lowercase letters, digits, and hyphens only
  • Must start with a letter or digit
  • Skills are namespaced by the author field

Trigger

The trigger object controls when and how the AI model selects this skill.

trigger:
  description: "Use when creating Word documents (.docx)"
  tags: [docx, word, document]
  file_patterns: ["*.docx"]
  priority: 50
FieldTypeDescription
descriptionstringRequired. Natural language — embedded in MCP instructions so the model matches tasks to skills
tagsstring[]Required. Keywords for skill_search matching
file_patternsstring[]Glob patterns for file-based matching
prioritynumber0–100, higher wins conflicts (default: 50)

Writing good trigger descriptions

The description is the primary signal the model uses to decide whether to load a skill. It is embedded directly into the MCP server instructions.

  • Be comprehensive — list all task types the skill covers
  • Include technology names — models match on specific keywords like "React", "Tailwind", "wagmi"
  • Avoid vague phrases — "React/Vue components, Tailwind styling, Web3 wallet integration" beats "Helps with frontend"
  • Keep it concise — repeated in every session's context

Priority levels

RangeUse case
0–19Demos and examples
20–39General community skills
40–59Specialized skills (default)
60–79Domain-specific with strict requirements
80–100Core/system skills

Dependencies

Declare dependencies on other skills with semver ranges:

dependencies:
  core/data-utils: ^1.0.0
  user/xlsx-parser: ~2.1.0

Dependencies are automatically resolved and installed. Circular dependencies are detected and rejected.

Compatibility

compatibility:
  min_context_tokens: 4000
  requires: [bash, file_system]
  models: []
FieldDescription
min_context_tokensMinimum tokens needed to load this skill
requiresCapabilities needed (bash, file_system, web_search)
modelsRestrict to specific models (empty = all)

Security permissions

security:
  permissions: [file:read, file:write, bash:execute]
PermissionDescription
file:readRead files
file:writeCreate/modify files
file:deleteDelete files
bash:executeRun shell commands
network:noneNo network access
network:allowlistRestricted network access
tool:web_searchWeb search capability
tool:*All tools

Skill composition

The works_with field declares relationships with other skills:

works_with:
  - skill: core/xlsx
    relationship: input
    description: "Can use data from Excel spreadsheets"
TypeDescription
inputThis skill consumes output from the referenced skill
outputThis skill produces data for the referenced skill
parallelBoth skills work together on the same task

Optional fields

FieldTypeDescription
repositorystringSource code URL

Full example

---
name: report-generator
version: 1.0.0
author: your-name
license: MIT
description: "Generate structured reports from data files"
language: en
 
trigger:
  description: "Use when creating reports from CSV, JSON, or database data"
  tags: [report, data, analysis, csv]
  file_patterns: ["*.csv", "*.json"]
  priority: 50
 
dependencies:
  core/data-utils: ^1.0.0
 
compatibility:
  min_context_tokens: 3000
  requires: [file_system]
  models: []
 
security:
  permissions: [file:read, file:write]
 
works_with:
  - skill: core/xlsx
    relationship: input
    description: "Can read data from Excel files"
 
repository: https://github.com/user/report-generator
---

skillbase.json — Workspace Manifest

skillbase.json is the project-level dependency manifest, analogous to package.json. It lives at the project root and is created by spm init.

{
  "schema_version": 1,
  "name": "my-project",
  "version": "1.0.0",
  "skills": {
    "@core/docx": "^1.2.0",
    "@core/xlsx": "^1.0.0"
  },
  "personas": {
    "@evseevnn/defi-analyst": "^1.0.0"
  },
  "registry": "https://registry.skillbase.space",
  "spm": {
    "default_instance": "corp-prod"
  }
}

Fields

FieldRequiredDescription
schema_versionYesAlways 1
nameYesProject identifier
versionYesSemver version
skillsNoSkill dependencies as "@author/name": "semver"
personasNoPersona dependencies as "@author/name": "semver"
registryNoOverride default registry URL
spm.default_instanceNoDefault OpenClaw remote instance name

CLI workflow

spm init                    # Creates skillbase.json
spm install                 # Installs all deps from skillbase.json
spm add @core/docx          # Installs + adds to skillbase.json
spm add @author/persona --persona  # Adds to personas section
spm remove @core/docx       # Removes from skillbase.json + disk

Migration

If you have a legacy skill.json from an older version, run spm migrate run to convert it to skillbase.json.