Skip to content

Skills Frontmatter Reference

Skills are markdown files (SKILL.md) with YAML frontmatter that define loadable capabilities for GSV agents. The system parses skill files from R2, evaluates eligibility against runtime conditions, and injects eligible skills into the agent's system prompt.

File Structure

A skill file consists of two parts separated by YAML frontmatter delimiters:

---
<frontmatter fields>
---
<markdown body>

The frontmatter is delimited by --- on its own line. The parser normalizes \r\n and \r to \n before processing. If no frontmatter delimiters are found, the entire file is treated as body content with an empty frontmatter object.

The markdown body contains the skill's instructions. It is served verbatim to the agent when the skill is loaded via the workspace read tool.

File Location

Skills are stored in R2 at two levels. Agent-local skills take precedence over global skills with the same name.

ScopeR2 PathDescription
Agent-localagents/{agentId}/skills/{skillName}/SKILL.mdPer-agent skill override
Globalskills/{skillName}/SKILL.mdShared across all agents

The {skillName} is derived from the directory name containing SKILL.md. When listing skills, agent-local skills are loaded first; global skills are loaded only if no agent-local skill with the same name exists.

Frontmatter Fields

name

PropertyValue
Typestring
RequiredNo
DefaultDirectory name (extracted from R2 key)

The display name of the skill. If omitted or empty, the skill name is inferred from the parent directory in the R2 path.

description

PropertyValue
Typestring
RequiredNo
DefaultFirst non-heading, non-empty paragraph of the body (truncated to 200 characters)

A short description of what the skill does. Displayed in the system prompt's skill listing to help the agent decide whether to load the skill.

homepage

PropertyValue
Typestring
RequiredNo
DefaultNone

URL for the skill's homepage or documentation.

always

PropertyValue
Typeboolean
RequiredNo
Defaultfalse

When true, the skill bypasses all runtime requirement checks and is always eligible. The skill still must not be disabled via skills.entries config.

metadata

PropertyValue
TypeJSON object (as a string or inline YAML block)
RequiredNo
Default{}

A JSON object containing platform-specific metadata under namespaced keys. The parser accepts relaxed JSON (trailing commas are tolerated). Three namespace keys are recognized:

Namespace KeyDescription
gsvGSV platform metadata
openclawOpenClaw platform metadata
clawdbotClawdbot platform metadata

The system resolves metadata in priority order: gsv > openclaw > clawdbot. The first non-undefined namespace is used for requirement evaluation.

Each namespace contains a CustomMetadata object with the following optional fields:

emoji

PropertyValue
Typestring
RequiredNo

Display emoji for the skill.

requires

An object specifying runtime requirements. All requirement arrays use AND semantics within a field (all entries must be satisfied) unless the field name starts with any (OR semantics — at least one must match).

FieldTypeSemanticsDescription
binsstring[]All requiredBinary names that must be present on the host (checked via hostBinStatus)
anyBinsstring[]At least oneBinary names where at least one must be present
envstring[]All requiredEnvironment variable keys that must exist on the host
configstring[]All requiredDotted gateway config paths that must resolve to truthy values
osstring[]At least oneOS identifiers the host must match (e.g., darwin, linux, windows). Compared case-insensitively.
hostRolesstring[]At least oneHost roles the node must have. Valid values: execution, specialized
capabilitiesstring[]All requiredCapability IDs the host must expose
anyCapabilitiesstring[]At least oneCapability IDs where at least one must be present

Valid capability IDs:

Capability IDDescription
filesystem.listList files in directories
filesystem.readRead file contents
filesystem.writeWrite file contents
filesystem.editEdit files in place
text.searchSearch file contents
shell.execExecute shell commands

Valid host roles:

Host RoleDescription
executionGeneral-purpose execution host. Must have baseline capabilities: filesystem.list, filesystem.read, filesystem.write, shell.exec.
specializedSpecial-purpose host with a custom capability set

install

PropertyValue
TypeArray<InstallEntry>
RequiredNo

Installation instructions for required binaries. Each entry has:

FieldTypeRequiredDescription
idstringNoIdentifier for the install method
kindstringYesPackage manager. One of: brew, apt, node, go, uv, download
labelstringNoHuman-readable label
binsstring[]NoBinaries provided by this install
formulastringNoPackage name for brew
packagestringNoPackage name for apt, node, go, uv

Eligibility Evaluation

Skill eligibility is computed per prompt build through a multi-stage pipeline.

Stage 1: Config Filter

The skills.entries config map is consulted. An entry is matched by (in order):

  1. Skill name
  2. Directory name extracted from the R2 location
  3. Full R2 location path

If a matching entry has enabled: false, the skill is excluded. Config entries can also override always and requires fields from the frontmatter.

Stage 2: Requirement Validation

Requirements are resolved from the config entry override (if present) or the skill's metadata. If any requirement array contains non-string entries, empty strings, or (for capabilities/hostRoles) unrecognized values, the skill is marked as having invalid requirements and is excluded — unless always is true.

Stage 3: Runtime Evaluation

For skills that are not always: true and have runtime requirements, the system evaluates against connected runtime nodes:

  1. No requirements defined: Skill is eligible.
  2. No connected hosts: Skill is ineligible.
  3. Host filtering: The candidate host set is progressively narrowed by each requirement:
    • hostRoles — filter to hosts with a matching role
    • capabilities — filter to hosts exposing all listed capabilities
    • anyCapabilities — filter to hosts exposing at least one listed capability
    • os — filter to hosts with a matching OS (case-insensitive)
    • env — filter to hosts with all listed environment variable keys
    • bins — filter to hosts where all listed binaries have true in hostBinStatus
    • anyBins — filter to hosts where at least one listed binary has true
  4. Config requirements (config): Each dotted path is resolved against the gateway config root. A value is truthy if it is non-null, non-undefined, a non-empty string, a non-empty array, a non-empty object, or a boolean true.

If the candidate host set is non-empty and all config requirements are satisfied, the skill is eligible.

Stage 4: Prompt Inclusion

Eligible skills are listed in an <available_skills> XML block in the system prompt. Each skill entry includes:

FieldSourceDescription
nameFrontmatter or directory nameSkill display name
alwaysEffective policyShown as attribute when true
descriptionFrontmatter or extracted from bodyShort description
locationR2 keyFull storage path
read_pathComputedVirtual path for the workspace read tool

The read_path maps agent-local skills from agents/{agentId}/skills/{name}/SKILL.md to skills/{name}/SKILL.md, preserving the virtual namespace. Global skills keep their skills/ prefix as-is.

Examples

Minimal Skill (No Requirements)

markdown
---
name: e2e-proof
description: Return a deterministic proof token when the user asks for "E2E SKILL PROOF"
always: false
---

# E2E Proof

Use this skill only when the user message includes the exact phrase:
`E2E SKILL PROOF`

Skill with Binary Requirements

markdown
---
name: github
description: "Interact with GitHub using the `gh` CLI."
metadata:
  {
    "openclaw":
      {
        "emoji": "🐙",
        "requires": { "bins": ["gh"] },
        "install":
          [
            {
              "id": "brew",
              "kind": "brew",
              "formula": "gh",
              "bins": ["gh"],
              "label": "Install GitHub CLI (brew)",
            },
          ],
      },
  }
---

# GitHub Skill
...

Skill with OR Binary Requirements

markdown
---
name: coding-agent
description: Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background shell sessions.
metadata:
  {
    "openclaw": { "emoji": "🧩", "requires": { "anyBins": ["claude", "codex", "opencode", "pi"] } },
  }
---

# Coding Agent
...

Skill with OS and Binary Requirements

markdown
---
name: tmux
description: Use tmux for interactive TUI applications.
metadata:
  { "gsv": { "emoji": "🖥️", "os": ["darwin", "linux"], "requires": { "bins": ["tmux"] } } }
---

# tmux Skill
...

Note: In the tmux example, the os field is placed at the top level of the gsv metadata object rather than inside requires. The eligibility evaluator reads os from within requires. Placement outside requires is not evaluated for eligibility purposes.