Skip to main content

Documentation 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.

The JSON Schema for skill.spec.yml is embedded in the CLI binary and covers every v0 construct. It enforces typed fields, required properties, and additionalProperties: false on every typed object — unknown fields are not warned about, they are invalid. The schema is the machine-readable companion to the Grammar Reference.

Getting the Schema

Print the embedded schema to a file with:
skillspec grammar schema --json > skill.spec.schema.json
You can then use it with any JSON Schema validator, wire it into your editor for YAML completion, or reference it in CI:
# Example: validate with ajv-cli
ajv validate -s skill.spec.schema.json -d skill.spec.yml
The schema $id is https://skillspec.dev/schemas/skill.spec.v0.json and targets JSON Schema draft 2020-12.

Strict Validation

Every typed object in the schema sets "additionalProperties": false. This means:
  • A field spelled prefr instead of prefer fails validation immediately.
  • A field spelled forbit instead of forbid fails validation immediately.
  • A field spelled elicitations at a route level (where it does not belong) fails validation immediately.
Without this strictness, misspelled behavior silently disappears: skillspec validate passes, the rule evaluates, but the misspelled effect never fires. Strict schema rejection turns silent data loss into an auditable error.
Explicit extension surfaces — metadata, allow values, choice sets, artifact schema, command success_when, and closures — use additionalProperties: true because they are intentionally open mappings.

Type Overview

TypeDescription
SkillSpecRoot document object. Requires schema, id, title, description.
RouteA candidate way to satisfy work. Requires id and label.
RuleA steering decision. Requires id. All other fields are optional.
ElicitationA bounded question. Requires question and choices.
DependencyA declared tool, file, env var, service, adapter, or browser requirement. Requires kind.
ImportA runtime-loadable Markdown file. Requires path and role.
ResourceProvenance or supporting source material. Requires path and role.
CodeBlockExecutable knowledge preserved from source or inline. Requires language, kind, and source.
ArtifactA named data product. Requires kind.
RecipeA structured procedure composed of ordered steps.
StateA named lifecycle position.
CommandAn instruction template with safety class. Requires template.
SnippetUser-facing prose. Requires text.
TestA scenario contract. Requires name, input, and expect.
ProofAggregate confidence metrics.

Safety Classes

The safety_class enum appears on commands, elicitation choices, and dependency permission and provision fields. It is a declaration for the harness — not an execution permission.
Safety ClassMeaning
read_onlySafe to run automatically when dependencies are present
local_readReads local workspace state; should stay inside the chosen working directory
local_writeWrites to the local filesystem; harness should confirm scope
network_readMay use authenticated network state; should preserve response provenance
network_writeWrites to a remote system; requires explicit approval
browser_attachDepends on live user session state; should ask before attaching or opening a browser
credential_requestMust stay visible and bounded; credentials must not be inlined
destructiveRequires explicit user approval before execution

Dependency Kinds

KindWhat It Represents
cliA command-line tool expected on PATH. Directly checkable by the reference CLI.
packageA language-level package (npm, cargo, pip, etc.). Harness-specific check.
fileA required local file. Directly checkable by the reference CLI.
envA required environment variable. Directly checkable by the reference CLI.
serviceA running external service. Harness-specific check.
adapterA named harness adapter or integration. Harness-specific check.
browserA browser instance or automation context. Harness-specific check.
The reference CLI can directly check cli, file, and env dependencies via skillspec deps check. package, service, adapter, and browser dependencies are harness-specific and are reported as requiring harness-level checks.

Import Roles

RoleWhen to Use
policyShared operating rules that apply before any task action. Use load: always.
referenceBranch-specific reference material loaded when a particular route or recipe is active.
procedureStep-by-step guidance for a task path. Connected via used_by or requires.imports.
exampleWorked examples of correct behavior. On-demand; connected to code or recipe.
skillAnother skill document loaded as active guidance during a run.

Resource Roles

RoleWhen to Use
source_materialOriginal prose skill or evidence document preserved for provenance.
referenceSupporting reference file that is not loaded as runtime guidance.
required_procedureA procedure document that must be consulted but is not a runtime import.
exampleExample output, fixture, or evidence that supports code provenance.
scriptA script file referenced by a code block or recipe.
assetAny other supporting file (image, data, template) needed by the skill.

Code Kinds

KindMeaning
exampleIllustrative code; not expected to be run automatically.
runnable_scriptReviewed and approved for execution through a recipe or command.
probeA lightweight inspection script; reads state without mutating it.
transformA data transformation that consumes and produces artifacts.
validatorA check script that asserts correctness of a condition or artifact.
troubleshootingDiagnostic code to run when a route or command fails.
referenceCode preserved for documentation purposes only.

Artifact Kinds

KindMeaning
fileA single file on the local filesystem.
directoryA directory tree.
jsonA structured JSON data product. May include an optional schema field.
textPlain text output.
imageAn image file (screenshot, diagram, export).
pdfA PDF document.
transcriptA session transcript or conversation log.
reportA structured or prose report document.

Cross-Reference Rules

skillspec validate enforces reference closure across the entire document. The most important rules:
  • Every Rule.prefer must reference an existing Route.id
  • Every Rule.route_order item must reference an existing Route.id
  • Every Rule.elicit item must reference an existing elicitation id
  • Every Rule.after_success item must reference an existing command or closure id
  • Every Test.expect.route must reference an existing Route.id
  • Every Elicitation.default must reference one of its own choices
  • Every Elicitation.required_when.route must reference an existing route
  • Every ElicitationChoice.route must reference an existing route
  • Every ElicitationChoice.next must reference an existing state
  • Every Import.requires.imports item must reference an existing import id
  • The import dependency graph must be acyclic
  • Every on_demand import must be connected via used_by, requires.imports, a code block, a recipe, or a load_import step
  • Every resource must be referenced by code or recipe, or declare used_by
  • Code.provenance must declare exactly one of resource or import
  • Every Code.requires.* item must reference an existing id of the appropriate kind
  • Every Code.inputs and Code.outputs item must reference an existing artifact
  • Every produced_by and consumed_by reference must use kind command, code, or recipe
  • Every recipe step reference must point at an existing id
  • Every scenario test must declare at least one concrete expectation
skillspec grammar sensemake --view porting teaches the grammar progressively before import — use it to understand which constructs to promote from prose before running skillspec validate on a generated draft.

Build docs developers (and LLMs) love