Commands
spm add
Add one or more skills, then install and link them immediately after writing the manifest.
spm init
Initialize a new skills.json manifest.
spm init: interactive initialization forinstallDirand additionallinkTargetsspm init --yes: non-interactive initialization with defaults- Fails if
skills.jsonalready exists
spm install
Install all skills defined in skills.json, and synchronize skills-lock.yaml, installDir, and linkTargets.
Options
Specifier Compatibility
When using --frozen-lockfile, the manifest and lockfile specifiers are compared semantically:
Manifest specifiers without a ref (commit/branch) are compatible with any lockfile ref. This allows teams to omit specific commits in skills.json while still using --frozen-lockfile in CI.
Examples
First-time install
When setting up a project for the first time (no lockfile exists):
This will:
- Resolve all git refs to specific commits
- Create
skills-lock.yamlwith pinned versions - Install skills to
installDir - Create symlinks in
linkTargets
CI install with frozen lockfile
In CI/CD pipelines, use --frozen-lockfile for reproducible builds:
This ensures:
- The exact versions in
skills-lock.yamlare installed - No network requests to resolve git refs (faster)
- CI fails if lockfile is out of sync (catching misconfigurations)
After adding a new skill
After running spm add or manually editing skills.json:
This will:
- Resolve the new skill's git ref
- Update
skills-lock.yamlwith the new entry - Install and link the new skill
Troubleshooting out-of-sync errors
If you get "Lockfile is out of sync" with --frozen-lockfile:
spm update
Refresh the git-based skills declared in the manifest to their latest resolved versions, with the option to update only selected skills.