skills-package-manager 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -8
- package/dist/index.js +775 -120
- package/package.json +8 -3
- package/skills/skills-package-manager-cli/SKILL.md +70 -0
- package/skills.schema.json +44 -0
package/README.md
CHANGED
|
@@ -31,7 +31,9 @@ spm add owner/repo --skill find-skills
|
|
|
31
31
|
|
|
32
32
|
# Direct specifier — skip discovery
|
|
33
33
|
spm add https://github.com/owner/repo.git#path:/skills/my-skill
|
|
34
|
-
spm add
|
|
34
|
+
spm add link:./local-source/skills/my-skill
|
|
35
|
+
spm add file:./skills-package.tgz#path:/skills/my-skill
|
|
36
|
+
spm add npm:@scope/skills-package#path:/skills/my-skill
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
After `spm add`, the newly added skills are resolved, materialized into `installDir`, and linked to each configured `linkTarget` immediately.
|
|
@@ -70,6 +72,7 @@ Default `skills.json` written by `spm init --yes`:
|
|
|
70
72
|
{
|
|
71
73
|
"installDir": ".agents/skills",
|
|
72
74
|
"linkTargets": [],
|
|
75
|
+
"selfSkill": false,
|
|
73
76
|
"skills": {}
|
|
74
77
|
}
|
|
75
78
|
```
|
|
@@ -83,10 +86,11 @@ spm install
|
|
|
83
86
|
```
|
|
84
87
|
|
|
85
88
|
This resolves each skill from its specifier, materializes it into `installDir` (default `.agents/skills/`), and creates symlinks for each `linkTarget`.
|
|
89
|
+
When `selfSkill` is `true`, `spm install` also installs the bundled `skills-package-manager-cli` skill so users get guidance for `skills.json`, `skills-lock.yaml`, and the `spm` workflow. This helper skill is not written to `skills-lock.yaml`.
|
|
86
90
|
|
|
87
91
|
### `spm update`
|
|
88
92
|
|
|
89
|
-
Refresh
|
|
93
|
+
Refresh resolvable skills declared in `skills.json` without changing the manifest:
|
|
90
94
|
|
|
91
95
|
```bash
|
|
92
96
|
spm update
|
|
@@ -96,8 +100,8 @@ spm update find-skills rspress-custom-theme
|
|
|
96
100
|
Behavior:
|
|
97
101
|
|
|
98
102
|
- Uses `skills.json` as the source of truth
|
|
99
|
-
- Re-resolves git refs
|
|
100
|
-
- Skips `
|
|
103
|
+
- Re-resolves git refs and npm package targets
|
|
104
|
+
- Skips `link:` skills, including the bundled self skill
|
|
101
105
|
- Fails immediately for unknown skill names
|
|
102
106
|
- Writes `skills-lock.yaml` only after fetch and link succeed
|
|
103
107
|
|
|
@@ -123,13 +127,14 @@ const skills = await listRepoSkills('vercel-labs', 'skills')
|
|
|
123
127
|
|
|
124
128
|
## Specifier Format
|
|
125
129
|
|
|
126
|
-
```
|
|
127
|
-
<source>#[ref&]path:<skill-path>
|
|
130
|
+
```text
|
|
131
|
+
git/file/npm: <source>#[ref&]path:<skill-path>
|
|
132
|
+
link: link:<path-to-skill-dir>
|
|
128
133
|
```
|
|
129
134
|
|
|
130
135
|
| Part | Description | Example |
|
|
131
136
|
|------|-------------|---------|
|
|
132
|
-
| `source` | Git URL
|
|
137
|
+
| `source` | Git URL, direct `link:` skill path, `file:` tarball, or `npm:` package name | `https://github.com/o/r.git`, `link:./local/skills/my-skill`, `file:./skills.tgz`, `npm:@scope/pkg` |
|
|
133
138
|
| `ref` | Optional git ref | `main`, `v1.0.0`, `HEAD`, `6cb0992`, `6cb0992a176f2ca142e19f64dca8ac12025b035e` |
|
|
134
139
|
| `path` | Path to skill directory within source | `/skills/my-skill` |
|
|
135
140
|
|
|
@@ -138,7 +143,11 @@ const skills = await listRepoSkills('vercel-labs', 'skills')
|
|
|
138
143
|
### Resolution Types
|
|
139
144
|
|
|
140
145
|
- **`git`** — Clones the repo, resolves commit hash, copies skill files
|
|
141
|
-
- **`
|
|
146
|
+
- **`link`** — Reads from a local directory and copies the selected skill
|
|
147
|
+
- **`file`** — Extracts a local `tgz` package and copies the selected skill
|
|
148
|
+
- **`npm`** — Resolves a package from the configured npm registry, locks the tarball URL/version/integrity, and installs from the downloaded tarball
|
|
149
|
+
|
|
150
|
+
`npm:` reads `registry` and scoped `@scope:registry` values from `.npmrc`. Matching `:_authToken`, `:_auth`, or `username` + `:_password` entries are also used for private registry requests.
|
|
142
151
|
|
|
143
152
|
## Architecture
|
|
144
153
|
|