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:

  1. Load skills.json, .npmrc, cache, and install state.
  2. Resolve the manifest into an in-memory install plan.
  3. Inject the bundled helper skill when selfSkill is enabled.
  4. Prune managed skills that are no longer declared.
  5. Fetch managed skills into installDir.
  6. Link skills into linkTargets.
  7. Write .skills-pm-install-state.json for 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 latest main commit.
  • npm: skills move to the registry latest version.
  • link:, local:, and file: skills are skipped.
  • skills.json is 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.