Imports are v0’s runtime-loadable instruction layer. They exist for Markdown or text that the harness should deliberately read while executing a skill: shared operating policy, branch-specific references, procedure documents, examples, or another skill document. Importing Markdown is not inheritance — it never merges another spec into the current document, never creates routes, rules, commands, or tests implicitly, and never weakens forbids. The currentDocumentation 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 remains the only grammar tree.
Import Fields
| Field | Required | Notes |
|---|---|---|
path | ✅ | Relative path from the skill.spec.yml directory to the Markdown file. |
role | ✅ | Declares how the harness should treat the content. |
description | — | Human description of what this import provides. |
section | — | Narrows the import to a single named heading and its children. |
load | — | always or on_demand (default). Controls when the harness reads the file. |
requires.imports | — | List of import ids that must be loaded before this one. |
used_by | — | Declares which skill constructs depend on this import. Required for on-demand imports that are not referenced by code or recipe. |
load_when | — | Advisory list of conditions under which to load. Harness-specific. |
Import Roles
Choosing the right role tells the harness — and future readers — how to treat the imported content.policy — shared operating rules
policy — shared operating rules
reference — branch-specific material
reference — branch-specific material
Reference documents loaded only when a particular route, rule, or recipe is active. Connect via
used_by or requires.imports.procedure — step-by-step guidance
procedure — step-by-step guidance
Procedure documents describe how to execute a task path. Connect them to a recipe that uses
load_import steps, or via used_by.example — worked examples
example — worked examples
Worked examples of correct behavior. On-demand only; connect to a code block or recipe that references them.
skill — another skill document
skill — another skill document
A full skill document loaded as active guidance. Useful for skills that hand off to or compose with another skill’s prose without merging its spec structure.
Load Modes
| Mode | Behavior |
|---|---|
always | Loaded after the spec is loaded and before any task actions begin. Can stand alone without a used_by reference. Use only for small, load-bearing policy that must be in context before the agent acts. |
on_demand (default) | Loaded only when its connected route, rule, recipe, code path, or parent import is active. Must be connected to the runtime graph by used_by, requires.imports, Code.requires.imports, Recipe.requires.imports, or a load_import recipe step. |
Sections
section narrows an import to a single named heading and its child content until the next heading at the same or higher level.
section is absent, the whole file is the import body.
Nested Imports
requires.imports is the only v0 nesting mechanism. It forms a directed acyclic graph of import ids. All imports live in the main spec’s top-level imports map; nesting is declared as references between those ids, not as declarations inside imported Markdown.
When a harness loads an import:
- Resolve the import id in the current spec’s
importsmap. - Load every id in
requires.importsfirst, in listed order (topological). - Then load the requested import.
- Skip duplicate loads during one decision run.
a.md, references/b.md, ../shared/c.md) resolve relative to the directory containing skill.spec.yml, even when b is loaded because a requires it.
Cycles are invalid. The following will fail skillspec validate:
Path Resolution
Import paths resolve relative to the directory containingskill.spec.yml. That rule applies to all imports, including nested ones.
skill/skill.spec.yml:
~home directory expansion- Environment variable substitution (
$VAR,${VAR}) - Shell command substitution
- Markdown links as import paths
- Absolute paths (harness-specific behavior only)
- URLs (harness-specific behavior only)
../ are allowed so a skill can import plugin-level shared guidance. Harnesses may still apply package-root or sandbox policy before reading the file.
Validating Imports
- Declared import paths resolve to existing files
- Declared sections exist in those files
- Explicit nesting is consistent (no cycles, all ids exist)
- Dependency-first load order is satisfiable
Example: Import Graph
The following is the conformance fixture for imports, fromconformance/valid/imports.skill.spec.yml:
shared_policy uses load: always — it is loaded at startup with no used_by required. task_reference is on_demand and declares used_by pointing at the local route, satisfying the reference closure requirement.
Resources vs. Imports
The decision betweenimports and resources determines whether a file becomes active guidance or preserved provenance.
| Aspect | Imports | Resources |
|---|---|---|
| Purpose | Runtime guidance loaded into agent context | Provenance, source evidence, scripts, assets |
| When loaded | Deliberately by harness during a run | Not loaded as guidance; referenced for provenance |
| Grammar role | Active instruction material | Supporting material and source evidence |
| Code provenance | provenance.import for code extracted from runtime guidance | provenance.resource for code extracted from source material |
| Use when | Agent must read the file as active task guidance | File is source provenance, an asset, a script, or evidence |
| Validated by | skillspec imports check | skillspec validate cross-reference checks |
resources. A shared policy document, procedure guide, or branch-specific reference that the agent must read during a run belongs in imports.