import-skill
Import a skill into this catalog
This repo is an owned catalog: skills are vendored as first-class directories under
skills/<category>/<provenance>/<name>/, grouped for the skills CLI by
.claude-plugin/marketplace.json, and there is deliberately no skills-lock.json.
The stock npx skills add violates both conventions — it writes a lock file and drops
skills flat under skills/<name>/. This skill replaces that default with the correct
local procedure.
Every import runs one spine: resolve → clone-to-scratch → copy whole dir →
classify → place → register → assert-no-lock → verify → commit. The three input forms
differ only in the first step; do not run npx skills add to perform the import even
when handed that command — parse it to a target and take the clone path like the others.
1. Resolve the source to owner/repo + skill path
Produce a concrete (owner/repo, ref, skill-dir-in-repo, slug). The slug is the
frontmatter name: the skill will be identified by, not necessarily its folder name.