Commands
npx skills-package-manager add
Add one or more skills, then install and link them immediately after writing the manifest.
For the npx workflow, this is also the main migration pitch: teams already familiar with npx skills add ... can usually start by replacing it with npx skills-package-manager add ... and keep the same high-level add habit.
Options
Examples
npx skills-package-manager init
Initialize a new skills.json manifest.
npx skills-package-manager init: interactive initialization forinstallDirand additionallinkTargetsnpx skills-package-manager init --yes: non-interactive initialization with defaultsselfSkilldefaults tofalsein the generated manifest- Fails if
skills.jsonalready exists
npx skills-package-manager install
Install all skills defined in skills.json, synchronize skills-lock.yaml, installDir, and linkTargets, and also install the bundled skills-package-manager-cli self skill when selfSkill is enabled. The helper skill is not written to skills-lock.yaml.
If patchedSkills contains an entry for a managed skill, the referenced patch file is applied after the base skill content is materialized. local: skills cannot be patched because their source directories are user-owned.
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 npx skills-package-manager 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:
npx skills-package-manager update
Refresh the resolvable skills declared in the manifest to their latest locked versions, with the option to update only selected skills.
npx skills-package-manager patch
Prepare a skill for patching.
Options
Workflow
- Resolve the currently locked content for the target skill.
- Extract an editable copy.
- Reapply the committed patch by default so you continue from the current patched state.
- Write patch edit metadata for
patch-commit.
npx skills-package-manager patch-commit
Generate a patch file from an edited patch directory and commit it into the project.
Options
Workflow
- Read the patch edit metadata from the directory created by
patch. - Diff the edited copy against the original resolved skill content.
- Write a patch file such as
patches/hello-skill.patch. - Record the patch under
patchedSkillsinskills.json. - Update
skills-lock.yamlwith patch path and digest metadata. - Reinstall and relink the patched skill immediately.