@skillsmith/cli 0.3.0 → 0.3.2

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 (107) hide show
  1. package/README.md +158 -0
  2. package/assets/skillsmith-skill/SKILL.md +235 -0
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/src/commands/author/index.d.ts +16 -0
  5. package/dist/src/commands/author/index.d.ts.map +1 -0
  6. package/dist/src/commands/author/index.js +18 -0
  7. package/dist/src/commands/author/index.js.map +1 -0
  8. package/dist/src/commands/author/init.d.ts +47 -0
  9. package/dist/src/commands/author/init.d.ts.map +1 -0
  10. package/dist/src/commands/author/init.js +346 -0
  11. package/dist/src/commands/author/init.js.map +1 -0
  12. package/dist/src/commands/author/mcp-init.d.ts +20 -0
  13. package/dist/src/commands/author/mcp-init.d.ts.map +1 -0
  14. package/dist/src/commands/author/mcp-init.js +183 -0
  15. package/dist/src/commands/author/mcp-init.js.map +1 -0
  16. package/dist/src/commands/author/subagent.d.ts +22 -0
  17. package/dist/src/commands/author/subagent.d.ts.map +1 -0
  18. package/dist/src/commands/author/subagent.js +166 -0
  19. package/dist/src/commands/author/subagent.js.map +1 -0
  20. package/dist/src/commands/author/transform.d.ts +22 -0
  21. package/dist/src/commands/author/transform.d.ts.map +1 -0
  22. package/dist/src/commands/author/transform.js +141 -0
  23. package/dist/src/commands/author/transform.js.map +1 -0
  24. package/dist/src/commands/author/utils.d.ts +27 -0
  25. package/dist/src/commands/author/utils.d.ts.map +1 -0
  26. package/dist/src/commands/author/utils.js +118 -0
  27. package/dist/src/commands/author/utils.js.map +1 -0
  28. package/dist/src/commands/index.d.ts +3 -1
  29. package/dist/src/commands/index.d.ts.map +1 -1
  30. package/dist/src/commands/index.js +6 -1
  31. package/dist/src/commands/index.js.map +1 -1
  32. package/dist/src/commands/install-skill.d.ts +13 -0
  33. package/dist/src/commands/install-skill.d.ts.map +1 -0
  34. package/dist/src/commands/install-skill.js +137 -0
  35. package/dist/src/commands/install-skill.js.map +1 -0
  36. package/dist/src/commands/manage.d.ts +4 -1
  37. package/dist/src/commands/manage.d.ts.map +1 -1
  38. package/dist/src/commands/manage.js +56 -10
  39. package/dist/src/commands/manage.js.map +1 -1
  40. package/dist/src/commands/merge.d.ts +17 -0
  41. package/dist/src/commands/merge.d.ts.map +1 -0
  42. package/dist/src/commands/merge.js +160 -0
  43. package/dist/src/commands/merge.js.map +1 -0
  44. package/dist/src/commands/recommend.d.ts +1 -4
  45. package/dist/src/commands/recommend.d.ts.map +1 -1
  46. package/dist/src/commands/recommend.helpers.d.ts +58 -0
  47. package/dist/src/commands/recommend.helpers.d.ts.map +1 -0
  48. package/dist/src/commands/recommend.helpers.js +428 -0
  49. package/dist/src/commands/recommend.helpers.js.map +1 -0
  50. package/dist/src/commands/recommend.js +50 -372
  51. package/dist/src/commands/recommend.js.map +1 -1
  52. package/dist/src/commands/recommend.types.d.ts +66 -0
  53. package/dist/src/commands/recommend.types.d.ts.map +1 -0
  54. package/dist/src/commands/recommend.types.js +14 -0
  55. package/dist/src/commands/recommend.types.js.map +1 -0
  56. package/dist/src/commands/search.d.ts.map +1 -1
  57. package/dist/src/commands/search.js +133 -18
  58. package/dist/src/commands/search.js.map +1 -1
  59. package/dist/src/commands/sync.d.ts.map +1 -1
  60. package/dist/src/commands/sync.js +6 -46
  61. package/dist/src/commands/sync.js.map +1 -1
  62. package/dist/src/config.d.ts +5 -0
  63. package/dist/src/config.d.ts.map +1 -1
  64. package/dist/src/config.js +7 -0
  65. package/dist/src/config.js.map +1 -1
  66. package/dist/src/import.d.ts +1 -0
  67. package/dist/src/import.d.ts.map +1 -1
  68. package/dist/src/import.js +20 -5
  69. package/dist/src/import.js.map +1 -1
  70. package/dist/src/index.d.ts +1 -0
  71. package/dist/src/index.d.ts.map +1 -1
  72. package/dist/src/index.js +11 -1
  73. package/dist/src/index.js.map +1 -1
  74. package/dist/src/utils/formatters.d.ts +39 -0
  75. package/dist/src/utils/formatters.d.ts.map +1 -0
  76. package/dist/src/utils/formatters.js +69 -0
  77. package/dist/src/utils/formatters.js.map +1 -0
  78. package/dist/src/utils/license.test.js +6 -1
  79. package/dist/src/utils/license.test.js.map +1 -1
  80. package/dist/src/utils/node-version.d.ts +41 -0
  81. package/dist/src/utils/node-version.d.ts.map +1 -0
  82. package/dist/src/utils/node-version.js +123 -0
  83. package/dist/src/utils/node-version.js.map +1 -0
  84. package/dist/tests/author.test.js +45 -45
  85. package/dist/tests/author.test.js.map +1 -1
  86. package/dist/tests/e2e/search.e2e.test.js +62 -6
  87. package/dist/tests/e2e/search.e2e.test.js.map +1 -1
  88. package/dist/tests/e2e/utils/hardcoded-detector.d.ts.map +1 -1
  89. package/dist/tests/e2e/utils/hardcoded-detector.js +44 -3
  90. package/dist/tests/e2e/utils/hardcoded-detector.js.map +1 -1
  91. package/dist/tests/install-skill.test.d.ts +8 -0
  92. package/dist/tests/install-skill.test.d.ts.map +1 -0
  93. package/dist/tests/install-skill.test.js +409 -0
  94. package/dist/tests/install-skill.test.js.map +1 -0
  95. package/dist/tests/manage.test.js +284 -8
  96. package/dist/tests/manage.test.js.map +1 -1
  97. package/dist/tests/node-version.test.d.ts +8 -0
  98. package/dist/tests/node-version.test.d.ts.map +1 -0
  99. package/dist/tests/node-version.test.js +200 -0
  100. package/dist/tests/node-version.test.js.map +1 -0
  101. package/dist/tests/recommend.test.js +94 -0
  102. package/dist/tests/recommend.test.js.map +1 -1
  103. package/package.json +3 -2
  104. package/dist/src/commands/author.d.ts +0 -90
  105. package/dist/src/commands/author.d.ts.map +0 -1
  106. package/dist/src/commands/author.js +0 -902
  107. package/dist/src/commands/author.js.map +0 -1
package/README.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  Command-line interface for Skillsmith - discover, manage, and author Claude Code skills.
4
4
 
5
+ ## What's New in v0.3.1
6
+
7
+ - **Database Fix**: Fixed "no such table: skills" error on fresh installations
8
+ - **API Resilience**: Improved handling of partial API responses
9
+ - **Import Improvements**: Better rate limiting (150ms default, configurable via `SKILLSMITH_IMPORT_DELAY_MS`)
10
+ - **Python Support**: Added Python file detection (`.py`, `.pyi`, `.pyw`) to `analyze` command
11
+
12
+ ## What's New in v0.3.0
13
+
14
+ - **Registry Sync**: Keep your local skill database up-to-date with `sync` command
15
+ - **Auto-Sync**: Configurable daily/weekly background sync during MCP sessions
16
+ - **Sync History**: Track sync operations with `sync history`
17
+
5
18
  ## What's New in v0.2.7
6
19
 
7
20
  - **MCP Server Scaffolding**: Generate TypeScript MCP servers with `author mcp-init`
@@ -27,6 +40,27 @@ Or use directly with npx:
27
40
  npx @skillsmith/cli search "testing"
28
41
  ```
29
42
 
43
+ ## Updating the CLI
44
+
45
+ Check your current version:
46
+
47
+ ```bash
48
+ skillsmith --version
49
+ ```
50
+
51
+ Update to the latest version:
52
+
53
+ ```bash
54
+ # If installed globally
55
+ npm update -g @skillsmith/cli
56
+
57
+ # Or reinstall to specific version
58
+ npm install -g @skillsmith/cli@latest
59
+
60
+ # Using npx always gets the latest
61
+ npx @skillsmith/cli@latest sync
62
+ ```
63
+
30
64
  ## Command Alias
31
65
 
32
66
  The CLI provides two command names:
@@ -289,6 +323,85 @@ skillsmith import --topic claude-skill --max 500
289
323
  - `-d, --db <path>` - Database path
290
324
  - `-v, --verbose` - Verbose output
291
325
 
326
+ ### sync
327
+
328
+ Synchronize your local skill database with the live Skillsmith registry.
329
+
330
+ ```bash
331
+ # Sync skills from registry (differential - only changes)
332
+ skillsmith sync
333
+
334
+ # Force full sync (ignore last sync time)
335
+ skillsmith sync --force
336
+
337
+ # Preview what would be synced
338
+ skillsmith sync --dry-run
339
+ ```
340
+
341
+ **Options:**
342
+ - `-f, --force` - Force full sync, ignore last sync timestamp
343
+ - `--dry-run` - Preview changes without writing to database
344
+ - `-d, --db <path>` - Database path
345
+ - `--json` - Output results as JSON
346
+
347
+ #### sync status
348
+
349
+ Show sync status and statistics.
350
+
351
+ ```bash
352
+ skillsmith sync status
353
+ ```
354
+
355
+ **Output includes:**
356
+ - Auto-sync enabled/disabled
357
+ - Sync frequency (daily/weekly)
358
+ - Last sync time
359
+ - Next scheduled sync
360
+ - Last run statistics
361
+
362
+ #### sync history
363
+
364
+ View sync operation history.
365
+
366
+ ```bash
367
+ # Show recent sync history
368
+ skillsmith sync history
369
+
370
+ # Show more entries
371
+ skillsmith sync history --limit 20
372
+ ```
373
+
374
+ **Options:**
375
+ - `-l, --limit <n>` - Number of history entries (default: 10)
376
+
377
+ #### sync config
378
+
379
+ Configure automatic sync settings.
380
+
381
+ ```bash
382
+ # Show current configuration
383
+ skillsmith sync config --show
384
+
385
+ # Enable automatic background sync
386
+ skillsmith sync config --enable
387
+
388
+ # Disable automatic sync
389
+ skillsmith sync config --disable
390
+
391
+ # Set sync frequency
392
+ skillsmith sync config --frequency daily
393
+ skillsmith sync config --frequency weekly
394
+
395
+ # Combine options
396
+ skillsmith sync config --enable --frequency weekly
397
+ ```
398
+
399
+ **Options:**
400
+ - `--show` - Display current configuration
401
+ - `--enable` - Enable automatic background sync
402
+ - `--disable` - Disable automatic sync
403
+ - `--frequency <freq>` - Set frequency: `daily` or `weekly`
404
+
292
405
  ## Configuration
293
406
 
294
407
  ### Environment Variables
@@ -296,6 +409,7 @@ skillsmith import --topic claude-skill --max 500
296
409
  | Variable | Description | Default |
297
410
  |----------|-------------|---------|
298
411
  | `SKILLSMITH_DB_PATH` | Database file location | `~/.skillsmith/skills.db` |
412
+ | `SKILLSMITH_IMPORT_DELAY_MS` | Delay between GitHub API calls during import | `150` |
299
413
  | `GITHUB_TOKEN` | GitHub token for imports | - |
300
414
 
301
415
  ### Database Location
@@ -306,6 +420,34 @@ By default, the CLI uses `~/.skillsmith/skills.db`. Override with:
306
420
  SKILLSMITH_DB_PATH=/custom/path/skills.db skillsmith search "testing"
307
421
  ```
308
422
 
423
+ ## Privacy & Data Handling
424
+
425
+ Skillsmith is designed with privacy as a core principle.
426
+
427
+ ### What Stays on Your Computer (Never Transmitted)
428
+
429
+ | Data | Location | Purpose |
430
+ |------|----------|---------|
431
+ | Skill usage history | `~/.skillsmith/analytics.db` | Personal ROI tracking |
432
+ | Time saved metrics | `~/.skillsmith/analytics.db` | Your productivity insights |
433
+ | Value calculations | Computed locally | ROI dashboard |
434
+ | Project context | Hashed locally | Anonymous grouping |
435
+
436
+ **The ROI Dashboard feature is 100% local.** Your usage patterns, time saved, and value metrics never leave your computer. This data exists solely for your benefit.
437
+
438
+ ### What Is Transmitted (Required for Functionality)
439
+
440
+ | Data | When | Why |
441
+ |------|------|-----|
442
+ | Search queries | When you search | To return matching skills |
443
+ | Skill IDs | When viewing/installing | To fetch skill details |
444
+
445
+ ### Optional Telemetry (Opt-In)
446
+
447
+ Anonymous product analytics (search counts, feature usage) are **opt-in only**. Telemetry is disabled by default and requires explicit configuration (`SKILLSMITH_TELEMETRY_ENABLED=true`).
448
+
449
+ To run fully offline: Set `SKILLSMITH_OFFLINE_MODE=true` to disable all network calls.
450
+
309
451
  ## Examples
310
452
 
311
453
  ### Discover and Install Skills
@@ -385,6 +527,22 @@ skillsmith remove community/old-skill
385
527
  skillsmith search --interactive
386
528
  ```
387
529
 
530
+ ### Keep Skills Up-to-Date
531
+
532
+ ```bash
533
+ # Sync with the live registry
534
+ skillsmith sync
535
+
536
+ # Check sync status
537
+ skillsmith sync status
538
+
539
+ # Enable daily auto-sync
540
+ skillsmith sync config --enable --frequency daily
541
+
542
+ # View sync history
543
+ skillsmith sync history
544
+ ```
545
+
388
546
  ## License
389
547
 
390
548
  [Elastic License 2.0](https://www.elastic.co/licensing/elastic-license)
@@ -0,0 +1,235 @@
1
+ ---
2
+ name: "skillsmith"
3
+ description: "Discover, install, compare, and manage Claude Code skills. Search the registry, get recommendations, validate skill quality, and manage your installed skills."
4
+ version: "0.1.0"
5
+ category: "productivity"
6
+ tags:
7
+ - skills
8
+ - discovery
9
+ - registry
10
+ - mcp
11
+ - installation
12
+ author: "Skillsmith"
13
+ allowed-tools:
14
+ - mcp__skillsmith
15
+ - Bash
16
+ ---
17
+
18
+ # Skillsmith Skill
19
+
20
+ Discover, install, compare, and manage Claude Code skills through natural language.
21
+
22
+ ## Trigger Phrases
23
+
24
+ - "search for skills", "find skills", "discover skills"
25
+ - "install skill", "add skill"
26
+ - "recommend skills", "suggest skills"
27
+ - "compare skills"
28
+ - "validate skill", "check skill"
29
+ - "list installed skills", "show my skills"
30
+ - "uninstall skill", "remove skill"
31
+ - "skill details", "get skill"
32
+ - "browse skills", "explore skills"
33
+ - "high quality skills", "verified skills"
34
+
35
+ ## Slash Commands
36
+
37
+ | Command | Description | Example |
38
+ |---------|-------------|---------|
39
+ | `/skillsmith search` | Search for skills by query or filters | `/skillsmith search testing` |
40
+ | `/skillsmith install` | Install a skill from the registry | `/skillsmith install community/jest-helper` |
41
+ | `/skillsmith recommend` | Get contextual skill recommendations | `/skillsmith recommend` |
42
+ | `/skillsmith compare` | Compare multiple skills side-by-side | `/skillsmith compare jest-helper vitest-helper` |
43
+ | `/skillsmith validate` | Validate a skill's structure | `/skillsmith validate ./my-skill` |
44
+ | `/skillsmith list` | List all installed skills | `/skillsmith list` |
45
+ | `/skillsmith uninstall` | Remove an installed skill | `/skillsmith uninstall jest-helper` |
46
+ | `/skillsmith get` | Get detailed skill information | `/skillsmith get community/jest-helper` |
47
+
48
+ ## MCP Tool Delegation
49
+
50
+ This skill delegates to the `mcp__skillsmith` MCP server for all operations. When the user requests skill-related actions, use the appropriate MCP tool.
51
+
52
+ **Note:** The examples below show the tool parameters. Invoke these using Claude's standard MCP tool calling mechanism.
53
+
54
+ ### Search for Skills
55
+
56
+ Use `mcp__skillsmith__search` with these parameters:
57
+ - `query` (optional): Search term
58
+ - `category` (optional): development, testing, devops, etc.
59
+ - `trust_tier` (optional): verified, community, experimental
60
+ - `min_score` (optional): Minimum quality score (0-100)
61
+ - `limit` (optional): Max results (default 10)
62
+
63
+ **Example:** Search for testing skills with quality score > 70
64
+ ```json
65
+ {
66
+ "query": "testing",
67
+ "min_score": 70,
68
+ "limit": 10
69
+ }
70
+ ```
71
+
72
+ **Note:** Either `query` OR at least one filter (`category`, `trust_tier`, `min_score`) must be provided.
73
+
74
+ ### Get Skill Details
75
+
76
+ Use `mcp__skillsmith__get_skill` with:
77
+ - `id` (required): Skill ID in format `author/name`
78
+
79
+ ```json
80
+ { "id": "community/jest-helper" }
81
+ ```
82
+
83
+ ### Install a Skill
84
+
85
+ Use `mcp__skillsmith__install_skill` with:
86
+ - `id` (required): Skill ID
87
+ - `force` (optional): Overwrite if exists
88
+
89
+ ```json
90
+ { "id": "community/jest-helper", "force": false }
91
+ ```
92
+
93
+ ### Uninstall a Skill
94
+
95
+ Use `mcp__skillsmith__uninstall_skill` with:
96
+ - `id` (required): Skill name
97
+
98
+ ```json
99
+ { "id": "jest-helper" }
100
+ ```
101
+
102
+ ### Get Recommendations
103
+
104
+ Use `mcp__skillsmith__skill_recommend` with:
105
+ - `context` (optional): Project context
106
+ - `limit` (optional): Max recommendations
107
+
108
+ ```json
109
+ { "context": "React TypeScript project", "limit": 5 }
110
+ ```
111
+
112
+ ### Compare Skills
113
+
114
+ Use `mcp__skillsmith__skill_compare` with:
115
+ - `skill_ids` (required): Array of 2-5 skill IDs to compare
116
+
117
+ ```json
118
+ { "skill_ids": ["community/jest-helper", "community/vitest-helper"] }
119
+ ```
120
+
121
+ ### Validate a Skill
122
+
123
+ Use `mcp__skillsmith__skill_validate` with:
124
+ - `path` (required): Path to skill directory
125
+
126
+ ```json
127
+ { "path": "./my-skill" }
128
+ ```
129
+
130
+ ## Usage Examples
131
+
132
+ ### Example 1: Search and Install
133
+
134
+ User: "Find testing skills for React"
135
+
136
+ 1. Search for skills using `mcp__skillsmith__search`:
137
+ ```json
138
+ { "query": "testing React" }
139
+ ```
140
+
141
+ 2. Present results to user with quality scores and trust tiers
142
+
143
+ 3. If user selects one, install using `mcp__skillsmith__install_skill`:
144
+ ```json
145
+ { "id": "community/react-testing-library-helper" }
146
+ ```
147
+
148
+ ### Example 2: Get Recommendations
149
+
150
+ User: "What skills would help with this codebase?"
151
+
152
+ 1. Analyze current project context (package.json, file types, etc.)
153
+
154
+ 2. Get recommendations using `mcp__skillsmith__skill_recommend`:
155
+ ```json
156
+ { "context": "Node.js TypeScript API with Express" }
157
+ ```
158
+
159
+ 3. Present recommendations with explanations
160
+
161
+ ### Example 3: Compare Options
162
+
163
+ User: "Compare jest-helper and vitest-helper"
164
+
165
+ Use `mcp__skillsmith__skill_compare`:
166
+ ```json
167
+ { "skill_ids": ["community/jest-helper", "community/vitest-helper"] }
168
+ ```
169
+
170
+ Present comparison table showing features, quality scores, trust tiers, etc.
171
+
172
+ ### Example 4: Browse by Category
173
+
174
+ User: "Show me verified security skills"
175
+
176
+ Use `mcp__skillsmith__search`:
177
+ ```json
178
+ { "category": "security", "trust_tier": "verified" }
179
+ ```
180
+
181
+ ### Example 5: Quality-Based Search
182
+
183
+ User: "Find high-quality DevOps skills"
184
+
185
+ Use `mcp__skillsmith__search`:
186
+ ```json
187
+ { "category": "devops", "min_score": 80 }
188
+ ```
189
+
190
+ ## Trust Tiers
191
+
192
+ | Tier | Description | Badge |
193
+ |------|-------------|-------|
194
+ | `verified` | Official Anthropic or partner skills | Green |
195
+ | `community` | Community-reviewed and approved | Yellow |
196
+ | `experimental` | New or beta skills, use with caution | Red |
197
+
198
+ ## Quality Scores
199
+
200
+ Quality scores (0-100) reflect skill quality based on:
201
+
202
+ - Repository health (stars, forks, activity)
203
+ - Documentation completeness
204
+ - Code quality indicators
205
+ - Community engagement
206
+
207
+ Recommended minimum scores:
208
+ - Production use: 70+
209
+ - General use: 50+
210
+ - Experimental: Any
211
+
212
+ ## CLI Fallback
213
+
214
+ If the MCP server is unavailable, use the CLI directly:
215
+
216
+ ```bash
217
+ # Search
218
+ skillsmith search "testing" --tier verified
219
+
220
+ # Install
221
+ skillsmith install community/jest-helper
222
+
223
+ # List installed
224
+ skillsmith list
225
+
226
+ # Remove
227
+ skillsmith remove jest-helper
228
+ ```
229
+
230
+ ## Related Commands
231
+
232
+ - `skillsmith analyze` - Analyze codebase for skill recommendations
233
+ - `skillsmith sync` - Sync skills from registry
234
+ - `skillsmith author init` - Create a new skill
235
+ - `skillsmith author validate` - Validate skill structure