Agent Skills
Skills are AI capability definitions. While rules constrain what the AI produces, skills shape how it works: a skill supplies a system prompt, declares which tools it may use, and carries a trust tier that decides how its prompt is placed in the conversation.
For a user-level walkthrough see the Agent Skills guide. This page is the file-format reference.
Skill Definition
Skills are project files under _Skills/. The loader (crates/ai/crates/sb-skills) reads .yaml / .yml files, and .md files with YAML frontmatter (if the Markdown has no prompts, its body becomes the system prompt).
skill_id: character_voice
name: Character Voice Generator
description: Generates dialogue and internal monologue in a character's unique voice
version: "1.0"
category: creative
applies_to: character
tags: [dialogue, voice, personality, writing]
prompts:
system: |
You are a creative writing assistant specializing in character voice.
Given a character's personality traits, background, and speech patterns,
generate dialogue or internal monologue that authentically represents
their voice. Maintain consistency with established character details.
capabilities:
- entity_read
- ai_generateSkill Fields Reference
| Field | Type | Required | Description |
|---|---|---|---|
skill_id | string | Yes | Unique identifier. A file without it is skipped. |
name | string | No | Display name. Defaults to skill_id. |
description | string | No | Human-readable description. |
version | string | No | Version string. Defaults to "1.0". |
category | string | No | Grouping category (for example creative). |
applies_to | string | No | A single entity type this skill targets. Empty = applies to every type. |
tags | list | No | Searchable tags. |
capabilities | list | No | Capability strings declared by the skill. |
prompts | map | No | Named prompts. The engine uses prompts.system (falling back to prompts.default). |
tool_scope | list | No | Tool namespaces the skill may use (sb/<id> convention). Empty means no tool access. |
output_contract | object | No | schema (JSON Schema) and optional description for the structured result. |
model | string | No | Model alias in sb/<id> form. Do not hardcode concrete model IDs. |
min_tier | string | No | Minimum plan tier. Defaults to free. |
invocation_scope | object | No | Nested-invocation settings (creates_child_session, inherit_context, max_turns). |
Unknown keys are ignored. Earlier versions of this page documented parameters (temperature, max_tokens, output_types) and {{field}} placeholders in a prompts.user template. The skill loader and engine do not read those: when a skill is invoked, the caller’s arguments are sent as the user message (JSON) after the system prompt.
Trust Tiers
The tier is set by the directory a skill is loaded from, not by the file contents:
| Directory | Tier | Behaviour |
|---|---|---|
Standard/, Core/ | built-in | system prompt is used as the system message. |
Custom/, User/, _Skills/ root | untrusted | Blocked with a consent_required result until the user consents. Once consented, the prompt is wrapped with delimiters and sent in the user turn, not the system turn. |
_Skills/Downloaded/ is intentionally never loaded or executed.
Resolution Order
When the same skill_id appears in several directories, the highest-priority copy wins:
Standard/ > Core/ > Custom/ > User/ > _Skills/ root (legacy)Because Standard/ has the highest priority, a Custom/ file with the same skill_id does not override a Standard skill. Give a custom skill its own skill_id instead.
Directory Structure
_Skills/
Standard/ # Built-in / catalog skills
Core/ # Built-in core skills
Custom/ # Your skills (publishing to the catalog reads from here)
User/ # Per-user skills
my_project_skill.yaml # Legacy root-level skillProject skills are plain files that sync with the project like templates and rules.
Creating a Custom Skill
# _Skills/Custom/recipe_chef.yaml
skill_id: recipe_chef
name: Chef Assistant
description: Generates recipes with professional culinary techniques and plating suggestions
version: "1.0"
category: creative
applies_to: recipe
tags: [cooking, culinary, plating, technique]
prompts:
system: |
You are a professional chef with expertise in multiple cuisines.
Generate recipes with precise measurements, professional techniques,
and plating suggestions. Include chef's tips for common mistakes.
capabilities:
- entity_read
- ai_generateMarketplace
Catalog skills install into the project’s skill directories, and a skill you publish is read from _Skills/Custom. See the marketplace.
Next Steps
- Agent Skills guide — Example skills and usage
- Template System Overview — What templates are and how they work
- AI Generation Rules — Constraints that complement skills
- Inheritance & Overrides — How resolution layers work for templates and rules