@robosoft/skillhub-cli 0.1.1 → 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.
- package/CHANGELOG.md +21 -21
- package/README.md +166 -184
- package/bin/skillhub.mjs +734 -364
- package/docs/skillhub-cli-logic.md +115 -83
- package/package.json +8 -5
- package/skillhub-registry/CHANGELOG.md +65 -0
- package/skillhub-registry/CLAUDE.md +108 -0
- package/skillhub-registry/README.md +196 -16
- package/skillhub-registry/docs/cheat-sheet.md +272 -0
- package/skillhub-registry/docs/contributing.md +166 -0
- package/skillhub-registry/docs/cost-hygiene.md +175 -0
- package/skillhub-registry/docs/customization.md +321 -0
- package/skillhub-registry/docs/exception-process.md +194 -0
- package/skillhub-registry/docs/installation.md +277 -0
- package/skillhub-registry/domain/api.md +303 -0
- package/skillhub-registry/domain/frontend/web-app.md +17 -0
- package/skillhub-registry/domain/frontend-app.md +46 -0
- package/skillhub-registry/domain/frontend-architecture.md +126 -0
- package/skillhub-registry/rules/anti-patterns.md +95 -0
- package/skillhub-registry/rules/code-standards.md +182 -0
- package/skillhub-registry/rules/frontend/antipattern.md +21 -0
- package/skillhub-registry/rules/frontend/component-standards.md +10 -0
- package/skillhub-registry/rules/frontend-app.md +24 -0
- package/skillhub-registry/rules/general.md +51 -0
- package/skillhub-registry/skills/api/SKILL.md +167 -0
- package/skillhub-registry/skills/build/SKILL.md +114 -0
- package/skillhub-registry/skills/fast/SKILL.md +56 -0
- package/skillhub-registry/skills/feature-dev/SKILL.md +166 -0
- package/skillhub-registry/skills/frontend/app/SKILL.md +28 -0
- package/skillhub-registry/skills/frontend/app/rules/main.md +6 -0
- package/skillhub-registry/skills/frontend/app/skill.json +10 -0
- package/skillhub-registry/skills/frontend/app/templates/feature/{{kebabName}}.tsx.hbs +11 -0
- package/skillhub-registry/skills/frontend-app/SKILL.md +48 -0
- package/skillhub-registry/skills/frontend-app/rules/main.md +6 -0
- package/skillhub-registry/skills/frontend-app/skill.json +11 -0
- package/skillhub-registry/skills/frontend-app/templates/feature/{{kebabName}}.tsx.hbs +11 -0
- package/skillhub-registry/skills/performance/SKILL.md +168 -0
- package/skillhub-registry/skills/react/SKILL.md +224 -0
- package/skillhub-registry/skills/refactor/SKILL.md +149 -0
- package/skillhub-registry/skills/review/SKILL.md +199 -0
- package/skillhub-registry/skills/strict/SKILL.md +74 -0
- package/skillhub-registry/skills/testing/SKILL.md +132 -0
- package/skillhub-registry/accessibility-review/1.0.0/SKILL.md +0 -22
- package/skillhub-registry/accessibility-review/1.0.0/checklist/ui-review.md +0 -8
- package/skillhub-registry/accessibility-review/1.0.0/skill.json +0 -9
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/SKILL.md +0 -37
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/checklist/definition-of-done.md +0 -9
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/rules/folder-structure.md +0 -7
- package/skillhub-registry/nextjs-clean-architecture/1.0.0/skill.json +0 -9
- package/skillhub-registry/shadcn-crud-generator/1.0.0/SKILL.md +0 -25
- package/skillhub-registry/shadcn-crud-generator/1.0.0/skill.json +0 -9
- package/skillhub-registry/shadcn-crud-generator/1.0.0/templates/feature/actions.ts.hbs +0 -16
- package/skillhub-registry/shadcn-crud-generator/1.0.0/templates/feature/page.tsx.hbs +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.3.2
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- Added
|
|
7
|
-
-
|
|
8
|
-
- Cursor skills now install under `.cursor/skills` and update `.cursor/rules/skillhub.mdc`.
|
|
9
|
-
- Claude skills now install under `.claude/skills` and update `CLAUDE.md` plus `.claude/skillhub.md`.
|
|
10
|
-
- Added `cloude` alias for `claude`.
|
|
5
|
+
- Changed Cursor rule attachment path from `.cursor/rules/skillhub/<name>.md` to `.cursor/rules/<name>.md`.
|
|
6
|
+
- Added migration for old Cursor config that still points rules to `.cursor/rules/skillhub`.
|
|
7
|
+
- Kept the generated adapter file as `.cursor/rules/skillhub.md` so Cursor has one index file listing attached knowledge.
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
## 0.3.1
|
|
10
|
+
|
|
11
|
+
- Treat registry/category prefixes like `frontend/` as lookup-only identifiers.
|
|
12
|
+
- Install local files using the last path segment, for example `frontend/antipattern` -> `antipattern.md`.
|
|
13
|
+
- Store source name, local name, version, and install path in `skillhub.json`.
|
|
14
|
+
- Make `skillhub add` with no arguments restore/reinstall all entries from `skillhub.json`.
|
|
15
|
+
- Allow removal by source path or local name.
|
|
13
16
|
|
|
14
|
-
## 0.
|
|
17
|
+
## 0.3.0
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
- Added short fetch commands: `skillhub skill`, `skillhub rule`, and `skillhub domain`.
|
|
20
|
+
- Added nested path support such as `skillhub rule frontend/antipattern`.
|
|
21
|
+
- Cursor adapter output now uses `.md` files only.
|
|
22
|
+
- Added remote web-app registry contract: `/api/skillhub/:section/:path/:version`.
|
|
23
|
+
- Repositioned CLI as the consumer/fetcher while the SkillHub web app is the authoring system.
|
|
24
|
+
- Added bundled examples for `frontend/app`, `frontend/antipattern`, and `frontend/web-app`.
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
## 0.2.0
|
|
19
27
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- `skillhub sync`
|
|
23
|
-
- `skillhub list`
|
|
24
|
-
- `skillhub remove <skill>`
|
|
25
|
-
- `skillhub create <skill>`
|
|
26
|
-
- `skillhub validate <skill|path>`
|
|
27
|
-
- `skillhub generate <skill> <template> <name>`
|
|
28
|
-
- Local demo registry with sample skills
|
|
29
|
-
- `AGENTS.md` and Cursor rule adapter generation
|
|
28
|
+
- Added skills, rules, and domain knowledge sections.
|
|
29
|
+
- Added Cursor, Claude, and generic AI targets.
|
package/README.md
CHANGED
|
@@ -1,263 +1,245 @@
|
|
|
1
1
|
# SkillHub CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Fetch reusable SkillHub knowledge from a web app or registry and attach it to an IDE project.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
SkillHub has three knowledge sections:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- **Skills**: capability/workflow packages, usually folders with `SKILL.md`, templates, examples, and supporting rules.
|
|
8
|
+
- **Rules**: focused `.md` rule files such as `frontend/antipattern.md` or `backend/security.md`.
|
|
9
|
+
- **Domain**: product, business, architecture, or platform knowledge in `.md` files.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
"name": "@robosoft/skillhub-cli",
|
|
12
|
-
"bin": {
|
|
13
|
-
"skillhub": "./bin/skillhub.mjs"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
```
|
|
11
|
+
The web frontend is the authoring system. Teams create and maintain skills, rules, and domain knowledge there. The CLI is the consumer used inside projects to fetch and attach that knowledge to Cursor, Claude, or a generic `.ai` folder. Yes, finally, the prompts are leaving sticky notes and becoming infrastructure.
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
skillhub
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Requirements
|
|
25
|
-
|
|
26
|
-
- Node.js 20+
|
|
27
|
-
|
|
28
|
-
## Global Install After Publishing
|
|
13
|
+
## Install
|
|
29
14
|
|
|
30
15
|
```bash
|
|
31
16
|
npm install -g @robosoft/skillhub-cli
|
|
32
|
-
skillhub --help
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Publish to npm
|
|
36
|
-
|
|
37
|
-
This zip is prepared for public npm publishing as `@robosoft/skillhub-cli`.
|
|
38
|
-
|
|
39
|
-
You must own or have access to the npm scope/organization `@robosoft`.
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm login
|
|
43
|
-
npm whoami
|
|
44
|
-
npm org ls robosoft
|
|
45
|
-
npm pack --dry-run
|
|
46
|
-
npm publish --access public
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
If you do not own the `@robosoft` npm scope, update the `name` field in `package.json` before publishing.
|
|
50
|
-
|
|
51
|
-
Example fallback:
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
{
|
|
55
|
-
"name": "@vikramrajput1987/skillhub-cli"
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Local Usage
|
|
60
|
-
|
|
61
|
-
From this folder:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npm run skillhub -- --help
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Or run directly:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
node ./bin/skillhub.mjs --help
|
|
71
17
|
```
|
|
72
18
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
Create SkillHub config inside your target project. The CLI can now ask where to place skill files:
|
|
19
|
+
If your Mac blocks global install with `EACCES`, set a user-owned npm global directory:
|
|
76
20
|
|
|
77
21
|
```bash
|
|
78
|
-
|
|
22
|
+
mkdir -p ~/.npm-global
|
|
23
|
+
npm config set prefix "$HOME/.npm-global"
|
|
24
|
+
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc
|
|
25
|
+
source ~/.zshrc
|
|
26
|
+
npm install -g @robosoft/skillhub-cli
|
|
79
27
|
```
|
|
80
28
|
|
|
81
|
-
|
|
29
|
+
## Quick Start
|
|
82
30
|
|
|
83
31
|
```bash
|
|
84
32
|
skillhub init --target cursor
|
|
85
|
-
skillhub
|
|
86
|
-
skillhub
|
|
33
|
+
skillhub skill frontend/app
|
|
34
|
+
skillhub rule frontend/antipattern
|
|
35
|
+
skillhub domain frontend/web-app
|
|
36
|
+
skillhub list
|
|
87
37
|
```
|
|
88
38
|
|
|
89
|
-
|
|
39
|
+
Cursor output uses only `.md` files. Registry/category prefixes like `frontend/` are used only for lookup. Locally the CLI installs by the last path segment:
|
|
90
40
|
|
|
91
41
|
```txt
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
42
|
+
.cursor/
|
|
43
|
+
skills/
|
|
44
|
+
app/
|
|
45
|
+
SKILL.md
|
|
46
|
+
skill.json
|
|
47
|
+
rules/
|
|
48
|
+
templates/
|
|
49
|
+
rules/
|
|
50
|
+
skillhub.md
|
|
51
|
+
antipattern.md
|
|
52
|
+
domain/
|
|
53
|
+
web-app.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Claude output:
|
|
96
57
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
58
|
+
```txt
|
|
59
|
+
.claude/
|
|
60
|
+
skills/
|
|
61
|
+
rules/
|
|
62
|
+
domain/
|
|
63
|
+
CLAUDE.md
|
|
101
64
|
```
|
|
102
65
|
|
|
103
|
-
|
|
66
|
+
Generic AI output:
|
|
104
67
|
|
|
105
|
-
```
|
|
106
|
-
|
|
68
|
+
```txt
|
|
69
|
+
.ai/
|
|
70
|
+
skills/
|
|
71
|
+
rules/
|
|
72
|
+
domain/
|
|
73
|
+
AGENTS.md
|
|
107
74
|
```
|
|
108
75
|
|
|
109
|
-
|
|
76
|
+
## Commands
|
|
110
77
|
|
|
111
78
|
```bash
|
|
112
|
-
skillhub
|
|
113
|
-
|
|
79
|
+
skillhub init --target cursor
|
|
80
|
+
skillhub target claude
|
|
114
81
|
|
|
115
|
-
|
|
82
|
+
# Short commands
|
|
83
|
+
skillhub skill frontend/app
|
|
84
|
+
skillhub rule frontend/antipattern
|
|
85
|
+
skillhub domain frontend/web-app
|
|
116
86
|
|
|
117
|
-
|
|
118
|
-
skillhub
|
|
119
|
-
|
|
87
|
+
# Equivalent attach syntax
|
|
88
|
+
skillhub attach skill frontend/app
|
|
89
|
+
skillhub attach rule frontend/antipattern
|
|
90
|
+
skillhub attach domain frontend/web-app
|
|
120
91
|
|
|
121
|
-
|
|
92
|
+
# Backward compatible install syntax
|
|
93
|
+
skillhub install frontend/app
|
|
94
|
+
skillhub install rule frontend/antipattern
|
|
95
|
+
skillhub install domain frontend/web-app
|
|
122
96
|
|
|
123
|
-
|
|
97
|
+
skillhub search frontend
|
|
98
|
+
skillhub sync
|
|
99
|
+
skillhub add # restore everything listed in skillhub.json
|
|
124
100
|
skillhub list
|
|
101
|
+
skillhub remove rule frontend/antipattern
|
|
125
102
|
```
|
|
126
103
|
|
|
127
|
-
|
|
104
|
+
## Web App Registry Usage
|
|
128
105
|
|
|
129
|
-
|
|
130
|
-
skillhub target cursor
|
|
131
|
-
skillhub target claude
|
|
132
|
-
skillhub target ai
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Sync all skills from `skillhub.json`:
|
|
106
|
+
Point the CLI to your SkillHub web app registry:
|
|
136
107
|
|
|
137
108
|
```bash
|
|
138
|
-
skillhub
|
|
109
|
+
skillhub init --target cursor --registry https://skillhub.your-company.com
|
|
110
|
+
skillhub rule frontend/antipattern
|
|
111
|
+
skillhub skill frontend/app
|
|
112
|
+
skillhub domain frontend/web-app
|
|
139
113
|
```
|
|
140
114
|
|
|
141
|
-
|
|
115
|
+
The recommended web API contract is:
|
|
142
116
|
|
|
143
|
-
```
|
|
144
|
-
skillhub
|
|
117
|
+
```txt
|
|
118
|
+
GET /api/skillhub/:section/:path/:version
|
|
145
119
|
```
|
|
146
120
|
|
|
147
|
-
|
|
121
|
+
Examples:
|
|
148
122
|
|
|
149
|
-
```
|
|
150
|
-
|
|
123
|
+
```txt
|
|
124
|
+
GET /api/skillhub/rules/frontend/antipattern/latest
|
|
125
|
+
GET /api/skillhub/skills/frontend/app/latest
|
|
126
|
+
GET /api/skillhub/domain/frontend/web-app/latest
|
|
151
127
|
```
|
|
152
128
|
|
|
153
|
-
|
|
129
|
+
Expected response:
|
|
154
130
|
|
|
155
|
-
```
|
|
156
|
-
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"manifest": {
|
|
134
|
+
"name": "frontend/antipattern",
|
|
135
|
+
"version": "1.0.0",
|
|
136
|
+
"type": "rule",
|
|
137
|
+
"section": "rules",
|
|
138
|
+
"entry": "RULE.md"
|
|
139
|
+
},
|
|
140
|
+
"files": [
|
|
141
|
+
{
|
|
142
|
+
"path": "RULE.md",
|
|
143
|
+
"content": "# Frontend Anti-Patterns\n..."
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
157
147
|
```
|
|
158
148
|
|
|
159
|
-
|
|
149
|
+
The CLI also supports a registry-only URL style:
|
|
160
150
|
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
|
|
151
|
+
```txt
|
|
152
|
+
GET /rules/frontend/antipattern/latest
|
|
153
|
+
GET /skills/frontend/app/latest
|
|
154
|
+
GET /domain/frontend/web-app/latest
|
|
164
155
|
```
|
|
165
156
|
|
|
166
|
-
##
|
|
157
|
+
## Local Registry Shape
|
|
167
158
|
|
|
168
|
-
|
|
159
|
+
Useful for local development or bundled examples:
|
|
169
160
|
|
|
170
161
|
```txt
|
|
171
162
|
skillhub-registry/
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
skills/
|
|
164
|
+
frontend/
|
|
165
|
+
app/
|
|
166
|
+
skill.json
|
|
167
|
+
SKILL.md
|
|
168
|
+
rules/
|
|
169
|
+
templates/
|
|
170
|
+
rules/
|
|
171
|
+
frontend/
|
|
172
|
+
antipattern.md
|
|
173
|
+
component-standards.md
|
|
174
|
+
domain/
|
|
175
|
+
frontend/
|
|
176
|
+
web-app.md
|
|
184
177
|
```
|
|
185
178
|
|
|
186
|
-
|
|
179
|
+
If `./skillhub-registry` does not exist in your project, the CLI falls back to the bundled registry shipped inside the package.
|
|
187
180
|
|
|
188
|
-
|
|
181
|
+
## Project Manifest and Restore
|
|
189
182
|
|
|
190
|
-
|
|
183
|
+
Every attached item is stored in `skillhub.json`, using the source path from the web app/registry and the local install name.
|
|
191
184
|
|
|
192
|
-
|
|
193
|
-
.cursor/skills/<skill-name>/
|
|
194
|
-
.cursor/rules/skillhub.mdc
|
|
195
|
-
skillhub.json
|
|
196
|
-
skillhub.lock.json
|
|
197
|
-
```
|
|
185
|
+
Example after running:
|
|
198
186
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
.claude/skillhub.md
|
|
204
|
-
CLAUDE.md
|
|
205
|
-
skillhub.json
|
|
206
|
-
skillhub.lock.json
|
|
187
|
+
```bash
|
|
188
|
+
skillhub rule frontend/antipattern
|
|
189
|
+
skillhub skill frontend/app
|
|
190
|
+
skillhub domain frontend/web-app
|
|
207
191
|
```
|
|
208
192
|
|
|
209
|
-
|
|
193
|
+
`skillhub.json` stores:
|
|
210
194
|
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"installed": {
|
|
198
|
+
"skills": {
|
|
199
|
+
"frontend/app": {
|
|
200
|
+
"name": "frontend/app",
|
|
201
|
+
"localName": "app",
|
|
202
|
+
"version": "1.0.0",
|
|
203
|
+
"installTo": ".cursor/skills/app"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"rules": {
|
|
207
|
+
"frontend/antipattern": {
|
|
208
|
+
"name": "frontend/antipattern",
|
|
209
|
+
"localName": "antipattern",
|
|
210
|
+
"version": "1.0.0",
|
|
211
|
+
"installTo": ".cursor/rules/antipattern.md"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"domain": {
|
|
215
|
+
"frontend/web-app": {
|
|
216
|
+
"name": "frontend/web-app",
|
|
217
|
+
"localName": "web-app",
|
|
218
|
+
"version": "1.0.0",
|
|
219
|
+
"installTo": ".cursor/domain/web-app.md"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
216
224
|
```
|
|
217
225
|
|
|
218
|
-
|
|
226
|
+
If someone deletes `.cursor/skills/app` or `.cursor/rules/antipattern.md`, run:
|
|
219
227
|
|
|
220
|
-
```
|
|
221
|
-
skillhub
|
|
222
|
-
skillhub target [ai|cursor|claude]
|
|
223
|
-
skillhub install <skill[@version]> [--target ai|cursor|claude]
|
|
224
|
-
skillhub sync
|
|
225
|
-
skillhub list
|
|
226
|
-
skillhub remove <skill>
|
|
227
|
-
skillhub create <skill>
|
|
228
|
-
skillhub validate <skill|path>
|
|
229
|
-
skillhub generate <skill> <template> <name>
|
|
228
|
+
```bash
|
|
229
|
+
skillhub add
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
The CLI re-fetches and restores everything listed in `skillhub.json`.
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Use `--as` only when you want a custom local name:
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
skillhub
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Expected endpoint format:
|
|
241
|
-
|
|
242
|
-
```txt
|
|
243
|
-
GET /skills/:name/:version
|
|
244
|
-
GET /skills/:name/latest
|
|
237
|
+
skillhub rule frontend/antipattern --as frontend-antipattern
|
|
245
238
|
```
|
|
246
239
|
|
|
247
|
-
|
|
240
|
+
## Publishing
|
|
248
241
|
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
"name": "nextjs-clean-architecture",
|
|
253
|
-
"version": "1.0.0",
|
|
254
|
-
"entry": "SKILL.md"
|
|
255
|
-
},
|
|
256
|
-
"files": [
|
|
257
|
-
{
|
|
258
|
-
"path": "SKILL.md",
|
|
259
|
-
"content": "# Next.js Clean Architecture"
|
|
260
|
-
}
|
|
261
|
-
]
|
|
262
|
-
}
|
|
242
|
+
```bash
|
|
243
|
+
npm login
|
|
244
|
+
npm publish --access public
|
|
263
245
|
```
|