@skillsmith/cli 0.3.1 → 0.3.3

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 (103) hide show
  1. package/README.md +57 -0
  2. package/assets/skillsmith-skill/SKILL.md +235 -0
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/src/commands/index.d.ts +2 -0
  5. package/dist/src/commands/index.d.ts.map +1 -1
  6. package/dist/src/commands/index.js +4 -0
  7. package/dist/src/commands/index.js.map +1 -1
  8. package/dist/src/commands/install-skill.d.ts +13 -0
  9. package/dist/src/commands/install-skill.d.ts.map +1 -0
  10. package/dist/src/commands/install-skill.js +137 -0
  11. package/dist/src/commands/install-skill.js.map +1 -0
  12. package/dist/src/commands/manage.d.ts +4 -1
  13. package/dist/src/commands/manage.d.ts.map +1 -1
  14. package/dist/src/commands/manage.js +60 -10
  15. package/dist/src/commands/manage.js.map +1 -1
  16. package/dist/src/commands/merge.d.ts +17 -0
  17. package/dist/src/commands/merge.d.ts.map +1 -0
  18. package/dist/src/commands/merge.js +160 -0
  19. package/dist/src/commands/merge.js.map +1 -0
  20. package/dist/src/commands/recommend-scoring.d.ts +29 -0
  21. package/dist/src/commands/recommend-scoring.d.ts.map +1 -0
  22. package/dist/src/commands/recommend-scoring.js +141 -0
  23. package/dist/src/commands/recommend-scoring.js.map +1 -0
  24. package/dist/src/commands/recommend.d.ts +1 -4
  25. package/dist/src/commands/recommend.d.ts.map +1 -1
  26. package/dist/src/commands/recommend.helpers.d.ts +40 -0
  27. package/dist/src/commands/recommend.helpers.d.ts.map +1 -0
  28. package/dist/src/commands/recommend.helpers.js +297 -0
  29. package/dist/src/commands/recommend.helpers.js.map +1 -0
  30. package/dist/src/commands/recommend.js +50 -372
  31. package/dist/src/commands/recommend.js.map +1 -1
  32. package/dist/src/commands/recommend.types.d.ts +66 -0
  33. package/dist/src/commands/recommend.types.d.ts.map +1 -0
  34. package/dist/src/commands/recommend.types.js +14 -0
  35. package/dist/src/commands/recommend.types.js.map +1 -0
  36. package/dist/src/commands/search-formatters.d.ts +35 -0
  37. package/dist/src/commands/search-formatters.d.ts.map +1 -0
  38. package/dist/src/commands/search-formatters.js +128 -0
  39. package/dist/src/commands/search-formatters.js.map +1 -0
  40. package/dist/src/commands/search-types.d.ts +46 -0
  41. package/dist/src/commands/search-types.d.ts.map +1 -0
  42. package/dist/src/commands/search-types.js +12 -0
  43. package/dist/src/commands/search-types.js.map +1 -0
  44. package/dist/src/commands/search.d.ts +3 -0
  45. package/dist/src/commands/search.d.ts.map +1 -1
  46. package/dist/src/commands/search.js +99 -89
  47. package/dist/src/commands/search.js.map +1 -1
  48. package/dist/src/config.d.ts +5 -0
  49. package/dist/src/config.d.ts.map +1 -1
  50. package/dist/src/config.js +7 -0
  51. package/dist/src/config.js.map +1 -1
  52. package/dist/src/index.d.ts +1 -0
  53. package/dist/src/index.d.ts.map +1 -1
  54. package/dist/src/index.js +11 -1
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/src/templates/mcp-server.template.d.ts +2 -17
  57. package/dist/src/templates/mcp-server.template.d.ts.map +1 -1
  58. package/dist/src/templates/mcp-server.template.js +9 -108
  59. package/dist/src/templates/mcp-server.template.js.map +1 -1
  60. package/dist/src/templates/mcp-template-handlers.d.ts +33 -0
  61. package/dist/src/templates/mcp-template-handlers.d.ts.map +1 -0
  62. package/dist/src/templates/mcp-template-handlers.js +106 -0
  63. package/dist/src/templates/mcp-template-handlers.js.map +1 -0
  64. package/dist/src/templates/mcp-template-types.d.ts +48 -0
  65. package/dist/src/templates/mcp-template-types.d.ts.map +1 -0
  66. package/dist/src/templates/mcp-template-types.js +18 -0
  67. package/dist/src/templates/mcp-template-types.js.map +1 -0
  68. package/dist/src/utils/license-types.d.ts +88 -0
  69. package/dist/src/utils/license-types.d.ts.map +1 -0
  70. package/dist/src/utils/license-types.js +60 -0
  71. package/dist/src/utils/license-types.js.map +1 -0
  72. package/dist/src/utils/license-validation.d.ts +61 -0
  73. package/dist/src/utils/license-validation.d.ts.map +1 -0
  74. package/dist/src/utils/license-validation.js +198 -0
  75. package/dist/src/utils/license-validation.js.map +1 -0
  76. package/dist/src/utils/license.d.ts +4 -71
  77. package/dist/src/utils/license.d.ts.map +1 -1
  78. package/dist/src/utils/license.js +7 -241
  79. package/dist/src/utils/license.js.map +1 -1
  80. package/dist/src/utils/license.test.js +6 -1
  81. package/dist/src/utils/license.test.js.map +1 -1
  82. package/dist/src/utils/node-version.d.ts +41 -0
  83. package/dist/src/utils/node-version.d.ts.map +1 -0
  84. package/dist/src/utils/node-version.js +123 -0
  85. package/dist/src/utils/node-version.js.map +1 -0
  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 +9 -8
package/README.md CHANGED
@@ -2,6 +2,13 @@
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
+
5
12
  ## What's New in v0.3.0
6
13
 
7
14
  - **Registry Sync**: Keep your local skill database up-to-date with `sync` command
@@ -33,6 +40,27 @@ Or use directly with npx:
33
40
  npx @skillsmith/cli search "testing"
34
41
  ```
35
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
+
36
64
  ## Command Alias
37
65
 
38
66
  The CLI provides two command names:
@@ -381,6 +409,7 @@ skillsmith sync config --enable --frequency weekly
381
409
  | Variable | Description | Default |
382
410
  |----------|-------------|---------|
383
411
  | `SKILLSMITH_DB_PATH` | Database file location | `~/.skillsmith/skills.db` |
412
+ | `SKILLSMITH_IMPORT_DELAY_MS` | Delay between GitHub API calls during import | `150` |
384
413
  | `GITHUB_TOKEN` | GitHub token for imports | - |
385
414
 
386
415
  ### Database Location
@@ -391,6 +420,34 @@ By default, the CLI uses `~/.skillsmith/skills.db`. Override with:
391
420
  SKILLSMITH_DB_PATH=/custom/path/skills.db skillsmith search "testing"
392
421
  ```
393
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
+
394
451
  ## Examples
395
452
 
396
453
  ### Discover and Install Skills
@@ -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