@skillsmith/cli 0.5.12 → 0.6.1

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.
Files changed (155) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +92 -2
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/src/commands/audit-collisions.d.ts +71 -0
  5. package/dist/src/commands/audit-collisions.d.ts.map +1 -0
  6. package/dist/src/commands/audit-collisions.js +300 -0
  7. package/dist/src/commands/audit-collisions.js.map +1 -0
  8. package/dist/src/commands/audit.d.ts +27 -2
  9. package/dist/src/commands/audit.d.ts.map +1 -1
  10. package/dist/src/commands/audit.js +73 -13
  11. package/dist/src/commands/audit.js.map +1 -1
  12. package/dist/src/commands/audit.test.js +2 -2
  13. package/dist/src/commands/audit.test.js.map +1 -1
  14. package/dist/src/commands/config.d.ts +55 -0
  15. package/dist/src/commands/config.d.ts.map +1 -0
  16. package/dist/src/commands/config.js +211 -0
  17. package/dist/src/commands/config.js.map +1 -0
  18. package/dist/src/commands/create.d.ts +3 -3
  19. package/dist/src/commands/create.d.ts.map +1 -1
  20. package/dist/src/commands/create.js +11 -9
  21. package/dist/src/commands/create.js.map +1 -1
  22. package/dist/src/commands/diff.js +2 -2
  23. package/dist/src/commands/diff.js.map +1 -1
  24. package/dist/src/commands/import-local.d.ts +21 -0
  25. package/dist/src/commands/import-local.d.ts.map +1 -0
  26. package/dist/src/commands/import-local.helpers.d.ts +28 -0
  27. package/dist/src/commands/import-local.helpers.d.ts.map +1 -0
  28. package/dist/src/commands/import-local.helpers.js +166 -0
  29. package/dist/src/commands/import-local.helpers.js.map +1 -0
  30. package/dist/src/commands/import-local.js +264 -0
  31. package/dist/src/commands/import-local.js.map +1 -0
  32. package/dist/src/commands/import-local.types.d.ts +59 -0
  33. package/dist/src/commands/import-local.types.d.ts.map +1 -0
  34. package/dist/src/commands/import-local.types.js +2 -0
  35. package/dist/src/commands/import-local.types.js.map +1 -0
  36. package/dist/src/{import.d.ts → commands/import.d.ts} +11 -0
  37. package/dist/src/commands/import.d.ts.map +1 -0
  38. package/dist/src/{import.js → commands/import.js} +39 -4
  39. package/dist/src/commands/import.js.map +1 -0
  40. package/dist/src/commands/index.d.ts +3 -0
  41. package/dist/src/commands/index.d.ts.map +1 -1
  42. package/dist/src/commands/index.js +6 -0
  43. package/dist/src/commands/index.js.map +1 -1
  44. package/dist/src/commands/info.d.ts.map +1 -1
  45. package/dist/src/commands/info.js +3 -3
  46. package/dist/src/commands/info.js.map +1 -1
  47. package/dist/src/commands/install-skill.d.ts.map +1 -1
  48. package/dist/src/commands/install-skill.js +6 -3
  49. package/dist/src/commands/install-skill.js.map +1 -1
  50. package/dist/src/commands/install.d.ts.map +1 -1
  51. package/dist/src/commands/install.js +81 -7
  52. package/dist/src/commands/install.js.map +1 -1
  53. package/dist/src/commands/login.d.ts.map +1 -1
  54. package/dist/src/commands/login.js +37 -0
  55. package/dist/src/commands/login.js.map +1 -1
  56. package/dist/src/commands/login.post-login-sync.test.d.ts +2 -0
  57. package/dist/src/commands/login.post-login-sync.test.d.ts.map +1 -0
  58. package/dist/src/commands/login.post-login-sync.test.js +120 -0
  59. package/dist/src/commands/login.post-login-sync.test.js.map +1 -0
  60. package/dist/src/commands/login.test-helpers.d.ts +7 -0
  61. package/dist/src/commands/login.test-helpers.d.ts.map +1 -0
  62. package/dist/src/commands/login.test-helpers.js +44 -0
  63. package/dist/src/commands/login.test-helpers.js.map +1 -0
  64. package/dist/src/commands/login.test.js +30 -31
  65. package/dist/src/commands/login.test.js.map +1 -1
  66. package/dist/src/commands/manage.d.ts.map +1 -1
  67. package/dist/src/commands/manage.js +17 -4
  68. package/dist/src/commands/manage.js.map +1 -1
  69. package/dist/src/commands/recommend.helpers.d.ts +5 -1
  70. package/dist/src/commands/recommend.helpers.d.ts.map +1 -1
  71. package/dist/src/commands/recommend.helpers.js +9 -3
  72. package/dist/src/commands/recommend.helpers.js.map +1 -1
  73. package/dist/src/commands/run-registry-sync.d.ts +31 -0
  74. package/dist/src/commands/run-registry-sync.d.ts.map +1 -0
  75. package/dist/src/commands/run-registry-sync.js +45 -0
  76. package/dist/src/commands/run-registry-sync.js.map +1 -0
  77. package/dist/src/commands/search.d.ts.map +1 -1
  78. package/dist/src/commands/search.helpers.d.ts +23 -0
  79. package/dist/src/commands/search.helpers.d.ts.map +1 -0
  80. package/dist/src/commands/search.helpers.js +57 -0
  81. package/dist/src/commands/search.helpers.js.map +1 -0
  82. package/dist/src/commands/search.js +12 -5
  83. package/dist/src/commands/search.js.map +1 -1
  84. package/dist/src/commands/sync.d.ts.map +1 -1
  85. package/dist/src/commands/sync.js +10 -21
  86. package/dist/src/commands/sync.js.map +1 -1
  87. package/dist/src/config.d.ts +6 -1
  88. package/dist/src/config.d.ts.map +1 -1
  89. package/dist/src/config.js +8 -2
  90. package/dist/src/config.js.map +1 -1
  91. package/dist/src/index.d.ts +1 -1
  92. package/dist/src/index.js +10 -28
  93. package/dist/src/index.js.map +1 -1
  94. package/dist/src/templates/mcp-server.template.d.ts +1 -1
  95. package/dist/src/templates/mcp-server.template.d.ts.map +1 -1
  96. package/dist/src/templates/mcp-server.template.js +13 -13
  97. package/dist/src/templates/mcp-server.template.js.map +1 -1
  98. package/dist/src/templates/mcp-server.template.snippets.d.ts +51 -0
  99. package/dist/src/templates/mcp-server.template.snippets.d.ts.map +1 -0
  100. package/dist/src/templates/mcp-server.template.snippets.js +162 -0
  101. package/dist/src/templates/mcp-server.template.snippets.js.map +1 -0
  102. package/dist/src/templates/readme.md.template.d.ts +1 -1
  103. package/dist/src/templates/readme.md.template.d.ts.map +1 -1
  104. package/dist/src/templates/readme.md.template.js +2 -2
  105. package/dist/src/utils/open-database.d.ts +27 -0
  106. package/dist/src/utils/open-database.d.ts.map +1 -0
  107. package/dist/src/utils/open-database.js +31 -0
  108. package/dist/src/utils/open-database.js.map +1 -0
  109. package/dist/src/utils/skills-directory.d.ts +26 -7
  110. package/dist/src/utils/skills-directory.d.ts.map +1 -1
  111. package/dist/src/utils/skills-directory.js +78 -33
  112. package/dist/src/utils/skills-directory.js.map +1 -1
  113. package/dist/tests/audit-collisions.test.d.ts +42 -0
  114. package/dist/tests/audit-collisions.test.d.ts.map +1 -0
  115. package/dist/tests/audit-collisions.test.js +370 -0
  116. package/dist/tests/audit-collisions.test.js.map +1 -0
  117. package/dist/tests/audit-restructure.test.d.ts +15 -0
  118. package/dist/tests/audit-restructure.test.d.ts.map +1 -0
  119. package/dist/tests/audit-restructure.test.js +151 -0
  120. package/dist/tests/audit-restructure.test.js.map +1 -0
  121. package/dist/tests/config.test.d.ts +33 -0
  122. package/dist/tests/config.test.d.ts.map +1 -0
  123. package/dist/tests/config.test.js +240 -0
  124. package/dist/tests/config.test.js.map +1 -0
  125. package/dist/tests/install-multi-client.test.d.ts +2 -0
  126. package/dist/tests/install-multi-client.test.d.ts.map +1 -0
  127. package/dist/tests/install-multi-client.test.js +202 -0
  128. package/dist/tests/install-multi-client.test.js.map +1 -0
  129. package/dist/tests/integration/import-local.test.d.ts +2 -0
  130. package/dist/tests/integration/import-local.test.d.ts.map +1 -0
  131. package/dist/tests/integration/import-local.test.js +158 -0
  132. package/dist/tests/integration/import-local.test.js.map +1 -0
  133. package/dist/tests/mcp-server-template.test.js +21 -0
  134. package/dist/tests/mcp-server-template.test.js.map +1 -1
  135. package/dist/tests/open-database.test.d.ts +2 -0
  136. package/dist/tests/open-database.test.d.ts.map +1 -0
  137. package/dist/tests/open-database.test.js +52 -0
  138. package/dist/tests/open-database.test.js.map +1 -0
  139. package/dist/tests/search-helpers.test.d.ts +2 -0
  140. package/dist/tests/search-helpers.test.d.ts.map +1 -0
  141. package/dist/tests/search-helpers.test.js +110 -0
  142. package/dist/tests/search-helpers.test.js.map +1 -0
  143. package/dist/tests/skills-directory.test.d.ts +2 -0
  144. package/dist/tests/skills-directory.test.d.ts.map +1 -0
  145. package/dist/tests/skills-directory.test.js +97 -0
  146. package/dist/tests/skills-directory.test.js.map +1 -0
  147. package/dist/tests/unit/commands/install.test.js +75 -1
  148. package/dist/tests/unit/commands/install.test.js.map +1 -1
  149. package/dist/tests/unit/import-local.helpers.test.d.ts +2 -0
  150. package/dist/tests/unit/import-local.helpers.test.d.ts.map +1 -0
  151. package/dist/tests/unit/import-local.helpers.test.js +96 -0
  152. package/dist/tests/unit/import-local.helpers.test.js.map +1 -0
  153. package/package.json +10 -4
  154. package/dist/src/import.d.ts.map +0 -1
  155. package/dist/src/import.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to `@skillsmith/cli` are documented here.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## v0.6.1
8
+
9
+ - **Fix**: SMI-4917 — repair first-time install (search crash, sync drops all skills, no self-config) (#1132)
10
+
11
+ ## v0.6.0
12
+
13
+ - **Feature**: SMI-4590 Wave 4 PR 5/6 — new `sklx audit collisions` subcommand runs the consumer namespace audit (mirrors the `skill_inventory_audit` MCP tool); new `sklx config get audit_mode` / `sklx config set audit_mode <preventative|power_user|governance|off>` for managing audit verbosity. Tier-revalidated: Free/Individual cannot select `power_user`/`governance`. (#950)
14
+ - **Feature**: SMI-4590 Wave 4 PR 1/6 — new `sklx audit advisories` subcommand for legacy security-advisory checks (the original `audit` semantic). Step 0b extracts shared audit-tool-dispatch into a reusable module. (#899)
15
+ - **Feature**: SMI-4590 Wave 4 PR 2/6 — `FrameworkAdapter`/`claudeCodeAdapter` plumbing wired through the CLI to support multi-framework audits in future. (#913)
16
+ - **Chore**: SMI-4575 npm keywords add `agent-skills`, `cursor`, `copilot` — unblocks discovery beyond the `claude-code` keyword as the rebrand sweep generalises to multi-client. No CLI behaviour change.
17
+ - **Bump**: `@skillsmith/core` dep range to `^0.6.0` — pulls in the new audit subpath exports and multi-client install paths.
18
+ - **Bump**: `@skillsmith/mcp-server` dep range to `^0.5.0` — required because `audit-collisions.ts` imports from `@skillsmith/mcp-server/audit`, which gained new types and exports in mcp-server 0.5.0.
19
+ - **Bump**: minor version (0.5.12 → 0.6.0) signals new CLI subcommand surface — `audit collisions`, `audit advisories`, `config set audit_mode`.
20
+
5
21
  ## v0.5.12
6
22
 
7
23
  - **Bump**: requires `@skillsmith/core` ≥ 0.5.6 to pick up the SMI-4486 schema-init fix that finally lets fresh installs run `skillsmith sync` without missing-table errors (#795).
package/README.md CHANGED
@@ -15,13 +15,15 @@ Command-line interface for Skillsmith - discover, manage, and author agent skill
15
15
 
16
16
  ## What's New in v0.5.0
17
17
 
18
- - **`skillsmith create` command**: Scaffold a new Claude Code skill directly into `~/.claude/skills/<name>/` — interactive prompts or non-interactive flags (`--description`, `--author`, `--type`, `--dry-run`, `--yes`)
18
+ - **`skillsmith create` command**: Scaffold a new agent skill directly into `~/.claude/skills/<name>/` — interactive prompts or non-interactive flags (`--description`, `--author`, `--type`, `--dry-run`, `--yes`)
19
19
  - **Stricter name validation**: `author init` and `create` share registry-safe validation (lowercase + hyphens only)
20
20
 
21
21
  > v0.5.1 is a version-bump-only release fixing an npm registry regression. No source changes.
22
22
 
23
23
  See [CHANGELOG.md](./CHANGELOG.md) for previous releases.
24
24
 
25
+ **Local-first by design.** Skillsmith caches the registry in a local SQLite database at `~/.skillsmith/skills.db`, shared across the MCP server, the CLI, and the VS Code extension. Search is FTS5 (SQLite's built-in keyword search) by default; semantic search is opt-in (`SKILLSMITH_USE_HNSW=true`) and runs over local ONNX embeddings (an open ML model format that runs on CPU — no API call). [Inside the Local Skill Database](https://skillsmith.app/blog/inside-the-local-skill-database) walks through the schema, the FTS5 / HNSW search paths, and how `sync` keeps the cache fresh.
26
+
25
27
  ## Installation
26
28
 
27
29
  ```bash
@@ -161,7 +163,7 @@ skillsmith init my-skill --path ./skills/my-skill
161
163
 
162
164
  ### create
163
165
 
164
- Scaffold a new Claude Code skill at `~/.claude/skills/<name>/`.
166
+ Scaffold a new agent skill at `~/.claude/skills/<name>/`.
165
167
 
166
168
  ```bash
167
169
  # Interactive mode
@@ -435,6 +437,94 @@ skillsmith sync config --enable --frequency weekly
435
437
  - `--disable` - Disable automatic sync
436
438
  - `--frequency <freq>` - Set frequency: `daily` or `weekly`
437
439
 
440
+ ### audit
441
+
442
+ #### audit advisories
443
+
444
+ Check installed skills against known security advisories (Team+ tier). Use `--fix` to attempt updating skills with available patches.
445
+
446
+ ```bash
447
+ # Check all installed skills
448
+ skillsmith audit advisories
449
+
450
+ # Output as JSON
451
+ skillsmith audit advisories --json
452
+
453
+ # Auto-update skills with patches
454
+ skillsmith audit advisories --fix
455
+ ```
456
+
457
+ **Options:**
458
+ - `--json` - Emit results as JSON
459
+ - `--fix` - Attempt `skillsmith update` for each advisory with a patch available
460
+
461
+ #### audit collisions
462
+
463
+ Audit installed skills for namespace collisions — duplicate tool names across multiple skills that could cause invocation conflicts (Community+).
464
+
465
+ ```bash
466
+ # Interactive audit (prompts for each collision)
467
+ skillsmith audit collisions
468
+
469
+ # Include semantic-overlap detector pass
470
+ skillsmith audit collisions --deep
471
+
472
+ # Output raw JSON (no prompts, no file writes)
473
+ skillsmith audit collisions --json
474
+
475
+ # Accept every suggestion automatically (requires typing APPLY ALL)
476
+ skillsmith audit collisions --apply-all
477
+
478
+ # Write report only, no interactive prompts
479
+ skillsmith audit collisions --report-only
480
+
481
+ # Clear the namespace-override ledger (requires typing RESET LEDGER)
482
+ skillsmith audit collisions --reset-ledger
483
+ ```
484
+
485
+ **Options:**
486
+ - `--deep` - Enable semantic-overlap detector pass
487
+ - `--json` - Emit `RunInventoryAuditResult` as JSON; bypasses prompts and file mutation
488
+ - `--apply-all` - Accept every rename suggestion; requires typing `APPLY ALL` to confirm
489
+ - `--report-only` - Write audit report without prompts or apply
490
+ - `--reset-ledger` - Clear `~/.skillsmith/namespace-overrides.json` (backs up first); requires typing `RESET LEDGER`
491
+
492
+ ### config
493
+
494
+ Get or set Skillsmith configuration values in `~/.skillsmith/config.json`.
495
+
496
+ #### config get
497
+
498
+ Print the resolved value of a configuration key.
499
+
500
+ ```bash
501
+ skillsmith config get audit_mode
502
+ ```
503
+
504
+ **Supported keys:** `audit_mode`
505
+
506
+ The resolved value reflects the config-file entry when set, else the tier default:
507
+ - `community` / `individual` → `preventative`
508
+ - `team` → `power_user`
509
+ - `enterprise` → `governance`
510
+
511
+ #### config set
512
+
513
+ Write a configuration value. Tier-revalidated on write — `community` and `individual` users cannot select `power_user` or `governance`.
514
+
515
+ ```bash
516
+ skillsmith config set audit_mode preventative
517
+ skillsmith config set audit_mode power_user # team/enterprise only
518
+ skillsmith config set audit_mode governance # enterprise only
519
+ skillsmith config set audit_mode off
520
+ ```
521
+
522
+ **Valid values for `audit_mode`:** `preventative`, `power_user`, `governance`, `off`
523
+
524
+ **Error codes (stderr, exit 1):**
525
+ - `audit.mode.invalid_value` — value not in the supported set
526
+ - `audit.mode.tier_ineligible` — your tier cannot select the requested mode
527
+
438
528
  ### login
439
529
 
440
530
  Authenticate the Skillsmith CLI with your API key. Opens your browser to [skillsmith.app/account/cli-token](https://skillsmith.app/account/cli-token), where you generate and copy a key, then paste it into the terminal prompt.