@hasna/skills 0.1.42 → 0.1.44
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 +34 -6
- package/bin/index.js +2311 -2219
- package/bin/mcp.js +1505 -814
- package/dist/cli/commands/portable-skills.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4566 -3773
- package/dist/lib/cli-mcp-parity.d.ts +14 -0
- package/dist/lib/mcp-contracts.d.ts +1 -1
- package/dist/lib/portable-skills.d.ts +79 -0
- package/dist/lib/registry.d.ts +1 -1
- package/dist/lib/skill-validation.d.ts +2 -0
- package/docs/skill-standard.md +126 -0
- package/package.json +2 -2
- package/skills/apidocs/.claude/settings.json +5 -0
package/README.md
CHANGED
|
@@ -83,6 +83,7 @@ requirements explicitly document local provider use.
|
|
|
83
83
|
| `skills list` | `ls` | List available skills (filter with `-c`, `--pinned`, `-t`, `--brief`) |
|
|
84
84
|
| `skills search <query>` | `s` | Search by name, description, or tags |
|
|
85
85
|
| `skills info <name>` | | Show metadata, env vars, and system dependencies |
|
|
86
|
+
| `skills show <name>` | | Show bundled or portable skill details |
|
|
86
87
|
| `skills docs <name>` | | Show documentation (SKILL.md > README.md > CLAUDE.md) |
|
|
87
88
|
| `skills requires <name>` | | Show env vars, system deps, and npm dependencies |
|
|
88
89
|
| `skills run <name> [args]` | | Execute a skill directly |
|
|
@@ -105,6 +106,8 @@ requirements explicitly document local provider use.
|
|
|
105
106
|
| `skills export` | | Export pinned skills as JSON |
|
|
106
107
|
| `skills import <file>` | | Pin skills from a JSON export |
|
|
107
108
|
| `skills config set <key> <value>` | | Set default agent, scope, or output format |
|
|
109
|
+
| `skills new <name>` | `scaffold` | Scaffold a portable skill under `~/.hasna/skills/<name>` |
|
|
110
|
+
| `skills port <path>` | `add` | Import an existing skill folder into the portable standard |
|
|
108
111
|
| `skills create <name>` | | Scaffold a new custom skill directory |
|
|
109
112
|
| `skills sync --to claude` | | Disabled by design; use `skills mcp --register <agent|all>` |
|
|
110
113
|
| `skills sync --from claude` | | Disabled by design; agent skill folders are not used |
|
|
@@ -138,8 +141,8 @@ Stable command shapes:
|
|
|
138
141
|
- Skill details: `info`, `docs`, `requires`, `validate`, `diff`, `test`,
|
|
139
142
|
`doctor`, `auth`, `whoami`, and `outdated` return command-specific objects or
|
|
140
143
|
arrays documented by their field names.
|
|
141
|
-
- Project state: `pin`, `unpin`, `update`, `init`, `import`, `create`,
|
|
142
|
-
`sync` return result objects/arrays; `--dry-run --json` returns
|
|
144
|
+
- Project state: `pin`, `unpin`, `update`, `init`, `import`, `create`, `new`,
|
|
145
|
+
`scaffold`, `port`, `add`, and `sync` return result objects/arrays; `--dry-run --json` returns
|
|
143
146
|
`{ "dryRun": true, "actions": [...] }` where applicable.
|
|
144
147
|
- Runtime: `run --json <skill> ...` returns
|
|
145
148
|
`{ "skill", "args", "exitCode", "stdout", "stderr", "error", "run" }`.
|
|
@@ -178,6 +181,25 @@ or the credential saved by `skills auth login`.
|
|
|
178
181
|
For the reusable upstream contract, see
|
|
179
182
|
`docs/architecture/reusable-skills-engine.md`.
|
|
180
183
|
|
|
184
|
+
## Portable Skills
|
|
185
|
+
|
|
186
|
+
Portable skills live directly under `~/.hasna/skills/<name>/` and follow the
|
|
187
|
+
standard documented in `docs/skill-standard.md`.
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
skills new my-skill
|
|
191
|
+
skills validate my-skill
|
|
192
|
+
skills run my-skill --help
|
|
193
|
+
skills show my-skill
|
|
194
|
+
|
|
195
|
+
skills port ./existing-skill
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The scaffold includes `SKILL.md`, `skill.json`, `AGENTS.md`, `package.json`,
|
|
199
|
+
`tsconfig.json`, and `src/index.ts`. `AGENTS.md` is written for coding agents:
|
|
200
|
+
after `skills new my-skill`, an agent can open that file, implement the skill,
|
|
201
|
+
update the manifest, run tests, and verify with `skills validate`.
|
|
202
|
+
|
|
181
203
|
## MCP Server
|
|
182
204
|
|
|
183
205
|
```bash
|
|
@@ -202,7 +224,11 @@ Endpoints: `GET /health` → `{"status":"ok","name":"skills"}`, MCP at `/mcp`.
|
|
|
202
224
|
Uses stateless `StreamableHTTPServerTransport` (shared process, many clients).
|
|
203
225
|
`skills-mcp` without flags still uses stdio (unchanged).
|
|
204
226
|
|
|
205
|
-
The MCP server exposes 20+ tools including `list_skills`, `search_skills`,
|
|
227
|
+
The MCP server exposes 20+ tools including `list_skills`, `search_skills`,
|
|
228
|
+
`scaffold_skill`, `port_skill`, `pin_skill`, `unpin_skill`, `pin_category`,
|
|
229
|
+
`list_pinned_skills`, `get_skill_info`, `get_skill_docs`, `get_requirements`,
|
|
230
|
+
`run_skill`, `get_run_status`, `schedule_skill`, `detect_project_skills`,
|
|
231
|
+
`validate_skill`, and more.
|
|
206
232
|
|
|
207
233
|
### Register with an Agent
|
|
208
234
|
|
|
@@ -278,15 +304,17 @@ bun run typecheck # TypeScript type checking
|
|
|
278
304
|
|
|
279
305
|
1. Create `skills/{name}/` with `src/index.ts`, `package.json`, `tsconfig.json`, `SKILL.md`
|
|
280
306
|
2. Add an entry to the `SKILLS` array in `src/lib/registry.ts`
|
|
281
|
-
3. Run `skills validate <name> --json` to check package metadata,
|
|
282
|
-
docs, and SKILL.md frontmatter
|
|
307
|
+
3. Run `skills validate <name> --json` to check package metadata, portable
|
|
308
|
+
manifests, bin entries, docs, and SKILL.md frontmatter
|
|
283
309
|
4. Run `bun test` to verify registry-wide validation passes
|
|
284
310
|
|
|
285
311
|
Premium hosted skills should add public contracts, pricing, docs, and tests
|
|
286
312
|
without adding private provider routing, hosted worker code, or secrets to the
|
|
287
313
|
OSS package.
|
|
288
314
|
|
|
289
|
-
|
|
315
|
+
Portable skill directories are auto-discovered from `~/.hasna/skills/<name>/`.
|
|
316
|
+
Legacy custom skill directories are still discovered from
|
|
317
|
+
`~/.hasna/skills/custom/`.
|
|
290
318
|
Project `.skills/` is reserved for runtime state and outputs.
|
|
291
319
|
|
|
292
320
|
## Data Directory
|