spmjs
v0.0.3
Published
Skill Package Manager for Git-based agent skills
Maintainers
Readme
SPM (Skill Package Manager)
SPM is a local Skill Package Manager for the current project.
It focuses on:
- Resolving skill sources (GitHub, skills.sh)
- Cloning and extracting skill subdirectories
- Installing Skills under
.agents/skills/ - Maintaining
skills.json
Why SPM
SPM treats Git repositories as the source of truth for Skills. It installs a Skill from a repo or subdirectory, locks the result to a commit, and places the installed files under .agents/skills/<name>/ so teams can review, share, and update Skills with normal Git workflows.
For the full design direction, see the proposal.
Features
- Install skills from multiple sources:
- GitHub repos and subdirectories
- GitHub
tree/blobURLs (includingSKILL.md) - skills.sh skill pages
- Copy skill code into
.agents/skills/<name>/ - Track installations in
skills.json - Implemented in TypeScript, built with tsdown, tested with vitest
Install & Build
From the spm/ directory:
cd spm
pnpm install --frozen-lockfileRun without installing:
npx spmjs --help
npx spmjs install https://github.com/github/awesome-copilot/tree/main/skills/git-commitBuild the CLI:
pnpm buildRun the CLI:
node dist/cli.mjs --help
# or, if installed or linked globally:
spm --helppackage.json declares:
"bin": {
"spm": "./dist/cli.mjs"
}The published package name is spmjs, and the installed executable is spm.
CLI Commands
All commands are intended to run from the project root (where skills.json lives).
install
Install a skill from a source string:
# 1) GitHub repo
spm install github/awesome-copilot
# 2) GitHub tree subdirectory
spm install https://github.com/github/awesome-copilot/tree/main/skills/git-commit
# 3) GitHub blob URL (parent directory is used as subdir)
spm install https://github.com/github/awesome-copilot/blob/main/skills/git-commit/SKILL.md
# 4) skills.sh
spm install https://skills.sh/github/awesome-copilot/git-commit
Install flow:
- Parse the source into
repo,subdir,ref git clonethe repository and extract the subdirectory- Copy the directory into
.agents/skills/<name>/ - Update
skills.json
list
spm listExample output:
Installed skills (1):
git-commit https://github.com/github/awesome-copilot (skills/git-commit) @5847a7cremove
spm remove git-commitWhat happens:
- Read
skills.json - Remove
.agents/skills/<name>/ - Update
skills.jsonand remove the skill entry
update
spm update git-commitWhat happens:
- Read
source/subdir/reffromskills.json - Clone the repo again and extract the subdir
- Replace
.agents/skills/<name>/ - Update
commitinskills.json
Project Layout
After installing skills, the project root looks like:
project/
├─ skills.json
├─ .agents/
│ └─ skills/
│ └─ <name>/ # Installed skill directoryskills.json example:
{
"skills": {
"git-commit": {
"source": "https://github.com/github/awesome-copilot",
"subdir": "skills/git-commit",
"ref": "main",
"commit": "5847a7c7e79bab3e400cf47800b83449d7aea2d4"
}
}
}Tech Stack
- Language: Node.js + TypeScript
- Build: tsdown (target
node20, ESM outputdist/cli.mjs) - Testing: vitest (
src/parser.test.tscovers GitHub / skills.sh URL parsing) - Runtime deps:
commander– CLI argument parsingexeca– runninggitfs-extra– filesystem utilities
Contributing
Contribution guidelines are in CONTRIBUTING.md. Release instructions are in docs/RELEASING.md.
