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 for installDir and additional linkTargets
  • spm init --yes: non-interactive initialization with defaults
  • Fails if skills.json already exists

spm install

Install all skills defined in skills.json, and synchronize skills-lock.yaml, installDir, and linkTargets.

Options

OptionDescription
--frozen-lockfileFail if lockfile is out of sync instead of updating it. Requires lockfile to exist and match manifest specifiers.

Specifier Compatibility

When using --frozen-lockfile, the manifest and lockfile specifiers are compared semantically:

ManifestLockfileResult
git://repo.git#path:/skillgit://repo.git#abc123&path:/skill✅ Compatible (manifest accepts any ref)
git://repo.git#main&path:/skillgit://repo.git#main&path:/skill✅ Compatible (refs match)
git://repo.git#abc123&path:/skillgit://repo.git#abc123&path:/skill✅ Compatible (refs match)
git://repo.git#abc123&path:/skillgit://repo.git#def456&path:/skill❌ Incompatible (refs differ)
git://repo.git#path:/skill-agit://repo.git#abc123&path:/skill-b❌ Incompatible (paths differ)

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):

spm install

This will:

  • Resolve all git refs to specific commits
  • Create skills-lock.yaml with 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:

spm install --frozen-lockfile

This ensures:

  • The exact versions in skills-lock.yaml are 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:

spm install

This will:

  • Resolve the new skill's git ref
  • Update skills-lock.yaml with 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:

# Option 1: Update the lockfile (recommended for local dev)
spm install

# Option 2: Check what changed
git diff skills.json skills-lock.yaml

spm update

Refresh the git-based skills declared in the manifest to their latest resolved versions, with the option to update only selected skills.