skillspec import-skill creates a mechanical draft skill.spec.yml from a local SKILL.md file or single skill folder after source-shape recon confirms one atomic package. The generated draft is scaffolding, not a finished semantic port — it requires a human review pass to promote headings to rules, verify dependencies, and add scenario tests before the spec is trustworthy.
Synopsis
Options
What the importer produces
After a successful import the following artifacts are written alongside the generated spec:Dependency inference
The importer builds dependency evidence from command blocks:- CLI deps — Inferred only from executable command evidence (shell/bash/zsh/console fenced blocks). Each accepted leading command token becomes a
kind: clidependency entry with acheckfield pointing back to the same command. - Python / JS / TS imports — Recorded as
referenceorexampleevidence indeps.toml, not as hard runtime dependencies. The review pass must complete the ledger. - Quarantine — Invalid prose-like candidates (
Optional.,TABLE, HTTP methods such asGET/POST, placeholders, private variable names) are quarantined in spec metadata rather than written as hard dependencies. Do not delete quarantine evidence to make QA pass.
dependency_count = 0; a byte-empty ledger is invalid.
When to use --source-map
For large or code-heavy source skills, run skillspec source map first, inspect source coverage, query nodes, dependencies, and code, then pass the fresh source-map.json:
skillspec source stale <source-map.json> to check freshness before passing one.
When NOT to use import-skill
Examples
Basic import from a single skill folder:After importing
The draft spec includes areview_required: section with the minimum review obligations:
- Review extracted headings and convert decision-heavy prose into
rules:. - Review command blocks and promote intentional ones to
commands:. - Review extracted resources and code snippets; promote only safe, intentional code into recipes.
- Review inferred command dependencies and add
permission/provisionchoices. - Review
deps.tomlwith typed evidence; complete the ledger for quarantined entries. - Add
tests:(scenario tests) before trusting the structured skill.
Use
skillspec grammar checklist --for import-skill to get the embedded coverage checklist for the semantic porting workflow before starting your review.Related commands
skillspec source map <path>— Build a source map for large or code-heavy skills before importing.skillspec source stale <source-map.json>— Check whether a source map is stale before passing it toimport-skill.skillspec grammar checklist --for import-skill— Show the embedded coverage checklist for the import workflow.skillspec grammar sensemake --view porting— Teach the grammar before importing so the harness understands spec constructs.skillspec validate <path>— Validate the generated draft after reviewing it.