The grammar is the normative description of every construct inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/modiqo/skillspec/llms.txt
Use this file to discover all available pages before exploring further.
skill.spec.yml. YAML is the interchange format; the grammar describes the conceptual tree independent of YAML spelling. v0 is deliberately not a programming language — it is a structured skill contract that expresses routes, rules, elicitations, states, commands, imports, resources, code, artifacts, recipes, snippets, closures, tests, and proof hooks without becoming an execution engine.
Document Structure
Everyskill.spec.yml follows the top-level skillspec production:
header — required fields
header — required fields
The header is the only mandatory section. Every valid spec must include all four fields.
activation — harness selection hints
activation — harness selection hints
activation provides hints a harness uses to decide whether to load the skill before reading the full spec. It does not execute routing.routes — candidate ways to satisfy work
routes — candidate ways to satisfy work
Routes are named strategies. Lower
rank means earlier default preference unless a rule overrides it.rules — steering decisions
rules — steering decisions
Rules match task signals and adjust route, forbids, elicitations, and post-success actions. Rules are evaluated in file order.
elicitations — bounded questions
elicitations — bounded questions
Elicitations ask a specific bounded question instead of an open-ended one. Choices may set facts, steer a route, or advance to a state.
trace — event-log contract
trace — event-log contract
trace declares which decision events should be persisted by an evaluator or harness.dependencies, imports, resources, code, artifacts, recipes
dependencies, imports, resources, code, artifacts, recipes
Declare required tools, runtime-loadable guidance, provenance material, executable knowledge, data products, and structured procedures respectively.
states, commands, snippets, closures
states, commands, snippets, closures
States are named lifecycle positions. Commands are instruction templates. Snippets are user-facing prose. Closures describe post-task behavior.
proof, tests, review-required, metadata
proof, tests, review-required, metadata
proof.metrics names the measures the policy is improving. tests are scenario contracts. review_required lists items that need human review. metadata is an open mapping.Identifiers
All named constructs in a spec use the identifier production:browser, local_cli, check-auth, task.router
Identifiers are stable API. They are what tests, compilers, and importing tools refer to. Human labels (like route.label or rule.reason) can change freely; identifiers should not churn because renaming one breaks every test, import, and cross-reference that names it.
Identifiers must start with a lowercase letter. Digits, underscores, hyphens, and dots are allowed after the first character. Uppercase, spaces, and other punctuation are not valid.
Header
The header section is mandatory. A spec is invalid without all four fields:| Field | Required | Type | Notes |
|---|---|---|---|
schema | ✅ | "skillspec/v0" | Literal constant. No other value is valid in v0. |
id | ✅ | identifier | Stable name for this skill. Used in imports, cross-references, and trace events. |
title | ✅ | string | Short human name. May change without breaking references. |
description | ✅ | string | One-line summary. Compiler targets may use it as frontmatter. |
Activation
activation and applies_when are harness-selection hints. A harness may use them to decide whether to load the skill, but they are not part of route decision logic.
activation.summary should be placed at the start of generated frontmatter descriptions so a harness can choose the skill before loading the full spec. activation.keywords widens the selection surface without changing route decision. activation.priority is advisory metadata for humans and harnesses.
Routes
Routes are candidate ways to satisfy work. They do not execute anything by themselves.| Field | Required | Notes |
|---|---|---|
id | ✅ | Stable identifier. Referenced by rules, tests, and elicitation choices. |
label | ✅ | Human-readable name. Shown in reports and generated skill docs. |
rank | — | Integer. Lower = earlier default preference. Rules can override. |
checks | — | List of command ids to run as readiness checks before this route is activated. |
tool_boundary | — | Phase-scoped permission contract. Inherited entry → route → phase. |
Rules
Rules are the steering layer. They are evaluated in file order; effects are additive exceptprefer (which replaces the selected route) and route_order (which replaces the current order).
user_says_any compose with logical OR):
| Field | Type | Meaning |
|---|---|---|
user_says_any | list of strings | Matches when any listed phrase appears in the input |
task_recurrence_likely | boolean | Task is likely to recur |
domain_object_task | boolean | Task involves a structured domain object |
interactive_prompt_likely | boolean | Task will likely present interactive prompts |
command_likely_long_running | boolean | The primary command will run for a long time |
Elicitations
Elicitations are bounded questions — used when the skill should ask for a specific missing decision rather than guessing or asking an open-ended question.sets), steer a route (route), or advance to a state (next). They do not execute commands by themselves.
required_when conditions fire when a specific route is selected, a fact is missing, or a predicate matches. default must reference one of the declared choice ids.
Trace
trace declares which decision events should be persisted by an evaluator or harness. The spec describes the contract; the evaluator writes the events.
event_log. If record is empty or absent, a conforming evaluator may record every v0 event kind.
| Event kind | Meaning |
|---|---|
input_received | The evaluator received the user input |
spec_loaded | The evaluator loaded a specific SkillSpec |
rule_evaluated | A rule was checked (matched or not) |
rule_matched | A rule matched and its effects are about to apply |
route_selected | A route was selected or replaced |
route_order_set | A rule replaced the route order |
forbid_added | A rule added forbidden substitutions |
allow_added | A rule added narrow allowed fallbacks |
elicitation_requested | A rule required a bounded user choice |
after_success_scheduled | A rule scheduled a post-success action |
outcome_recorded | The evaluator recorded the final decision outcome |
required is true, a conforming harness should either write the trace or state that tracing is unavailable before relying on the decision.
Tests
Tests are scenario contracts. Every meaningful route rule should have at least one scenario.| Family | Semantics |
|---|---|
Plain list (e.g. route, forbid, elicit, matched_rules) | Assert inclusion — the listed items must appear in the result |
*_exact (e.g. forbid_exact, elicit_exact, matched_rules_exact) | Assert the exact set — no more, no fewer |
not_* (e.g. not_forbid, not_elicit, not_matched_rules) | Assert absence — the listed items must not appear |
Proof
proof.metrics names the measures the policy is trying to improve:
Validation
skillspec validate <path> performs structural and cross-reference checks on a spec. The key rules enforced:
- Every
Rule.preferreferences an existingRoute.id - Every
Rule.elicititem references an existing elicitation - Every
Elicitation.defaultreferences one of its choices - Every
Test.expect.routereferences an existingRoute.id - Every
Command.requires.dependenciesitem references an existing dependency - The import dependency graph is acyclic
- Every on-demand import is connected to the runtime graph
- Every scenario test declares at least one concrete expectation
Minimal Valid Spec
The following is the smallest validskill.spec.yml, taken from the conformance suite: