CLI commands
The CLI workflow centers on six actions: add, init, install, patch, patch-commit, and update.
npx skills-package-manager add
add discovers or accepts a skill specifier, writes the selected skill to skills.json, and installs it immediately.
For remote sources, add writes pinned specifiers:
- GitHub and git sources are written with a resolved commit.
- npm sources are written with a resolved version.
npx skills-package-manager init
init creates skills.json in the current project. It prompts for installDir and linkTargets unless --yes is passed.
npx skills-package-manager install
install restores everything declared in skills.json.
Install process:
- Load
skills.json,.npmrc, cache, and install state. - Resolve the manifest into an in-memory install plan.
- Inject the bundled helper skill when
selfSkillis enabled. - Prune managed skills that are no longer declared.
- Fetch managed skills into
installDir. - Link skills into
linkTargets. - Write
.skills-pm-install-state.jsonfor repeat-install fast paths.
No separate lock file is written.
npx skills-package-manager update
update refreshes already-declared remote skills.
- Git and
github:skills move to the latestmaincommit. npm:skills move to the registrylatestversion.link:,local:, andfile:skills are skipped.skills.jsonis written only after the updated install succeeds.
npx skills-package-manager patch
patch resolves the current manifest content for a skill, extracts an editable copy, and records patch edit metadata.
npx skills-package-manager patch-commit
patch-commit generates a patch file, records it under patchedSkills in skills.json, and immediately reinstalls the patched skill.