guardskills 1.0.0 → 1.1.0
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 +101 -64
- package/dist/cli.cjs +791 -28
- package/dist/cli.js +791 -28
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ npx guardskills add https://github.com/vercel-labs/skills --skill find-skills
|
|
|
40
40
|
|
|
41
41
|
- `guardskills add <repo> --skill <name>`
|
|
42
42
|
- `guardskills scan-local <path>`
|
|
43
|
+
- `guardskills scan-clawhub <identifier>`
|
|
43
44
|
- GitHub resolver (`owner/repo` and `https://github.com/...`)
|
|
44
45
|
- Deterministic static scanner with rule matrix in `RULES.md`
|
|
45
46
|
- Score-based decision engine with hard-block guardrails
|
|
@@ -89,61 +90,97 @@ npm run ci
|
|
|
89
90
|
npm run audit:prod
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
## Scan Skills by Source
|
|
94
|
+
|
|
95
|
+
Use this section as the clean reference for supported scan sources.
|
|
96
|
+
|
|
97
|
+
### 1. Local Skills
|
|
98
|
+
|
|
99
|
+
Scan a skill folder on disk:
|
|
93
100
|
|
|
94
101
|
```bash
|
|
95
|
-
guardskills
|
|
102
|
+
guardskills scan-local C:\path\to\skill-folder
|
|
96
103
|
```
|
|
97
104
|
|
|
98
|
-
|
|
105
|
+
If the path contains multiple skills:
|
|
99
106
|
|
|
100
107
|
```bash
|
|
101
|
-
guardskills scan-local C:\path\to\skill-folder
|
|
108
|
+
guardskills scan-local C:\path\to\skills --skill <skill-folder-name>
|
|
102
109
|
```
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
JSON output:
|
|
105
112
|
|
|
106
113
|
```bash
|
|
107
|
-
guardskills
|
|
114
|
+
guardskills scan-local C:\path\to\skill-folder --json
|
|
108
115
|
```
|
|
109
116
|
|
|
110
|
-
|
|
117
|
+
### 2. GitHub Skills
|
|
118
|
+
|
|
119
|
+
Scan a GitHub-hosted skill without installing:
|
|
111
120
|
|
|
112
121
|
```bash
|
|
113
|
-
guardskills add owner/repo --skill name
|
|
114
|
-
--github-timeout-ms 15000 \
|
|
115
|
-
--github-retries 2 \
|
|
116
|
-
--github-retry-base-ms 300 \
|
|
117
|
-
--max-file-bytes 250000 \
|
|
118
|
-
--max-aux-files 40 \
|
|
119
|
-
--max-total-files 120
|
|
122
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
120
123
|
```
|
|
121
124
|
|
|
122
|
-
|
|
125
|
+
Also supported:
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
```bash
|
|
128
|
+
guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
CI/machine-readable output:
|
|
125
132
|
|
|
126
133
|
```bash
|
|
127
|
-
guardskills
|
|
134
|
+
guardskills add owner/repo --skill <skill-name> --ci --json
|
|
128
135
|
```
|
|
129
136
|
|
|
130
|
-
|
|
137
|
+
### 3. `skills.sh` Skills
|
|
138
|
+
|
|
139
|
+
For `skills.sh` installs, run the same guarded GitHub scan flow first:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Then, only if acceptable, run the guarded install handoff:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
guardskills add owner/repo --skill <skill-name>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Never run `skills add ...` directly before `guardskills`.
|
|
152
|
+
|
|
153
|
+
### 4. ClawHub Skills
|
|
154
|
+
|
|
155
|
+
Scan by ClawHub identifier:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
guardskills scan-clawhub owner/skill-slug
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Scan by full ClawHub link:
|
|
131
162
|
|
|
132
163
|
```bash
|
|
133
|
-
guardskills scan-
|
|
164
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug
|
|
134
165
|
```
|
|
135
166
|
|
|
136
|
-
|
|
167
|
+
JSON output:
|
|
137
168
|
|
|
138
169
|
```bash
|
|
139
|
-
guardskills scan-
|
|
170
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug --json
|
|
140
171
|
```
|
|
141
172
|
|
|
142
|
-
|
|
173
|
+
## Resolver Controls
|
|
143
174
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
175
|
+
```bash
|
|
176
|
+
guardskills add owner/repo --skill name \
|
|
177
|
+
--github-timeout-ms 15000 \
|
|
178
|
+
--github-retries 2 \
|
|
179
|
+
--github-retry-base-ms 300 \
|
|
180
|
+
--max-file-bytes 250000 \
|
|
181
|
+
--max-aux-files 40 \
|
|
182
|
+
--max-total-files 120
|
|
183
|
+
```
|
|
147
184
|
|
|
148
185
|
## Configuration File
|
|
149
186
|
|
|
@@ -202,77 +239,64 @@ Use this section as instructions for OpenClaw so it runs `guardskills` before in
|
|
|
202
239
|
|
|
203
240
|
Before any skill install, always run a `guardskills` scan first.
|
|
204
241
|
|
|
205
|
-
### 1.
|
|
206
|
-
|
|
207
|
-
Use `guardskills add` with `--dry-run` for scan-only mode.
|
|
242
|
+
### 1. Local Skills
|
|
208
243
|
|
|
209
244
|
```bash
|
|
210
|
-
guardskills
|
|
245
|
+
guardskills scan-local <path-to-skill-folder>
|
|
211
246
|
```
|
|
212
247
|
|
|
213
|
-
|
|
248
|
+
If multiple skills are found:
|
|
214
249
|
|
|
215
250
|
```bash
|
|
216
|
-
guardskills
|
|
251
|
+
guardskills scan-local <path-to-skills-root> --skill <skill-folder-name>
|
|
217
252
|
```
|
|
218
253
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
`https://github.com/expo/skills/tree/main/plugins/expo-app-design`
|
|
222
|
-
|
|
223
|
-
convert it to:
|
|
224
|
-
|
|
225
|
-
- repo: `expo/skills`
|
|
226
|
-
- skill: `expo-app-design`
|
|
227
|
-
|
|
228
|
-
Then run:
|
|
254
|
+
### 2. GitHub Skills
|
|
229
255
|
|
|
230
256
|
```bash
|
|
231
|
-
guardskills add
|
|
257
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
232
258
|
```
|
|
233
259
|
|
|
234
|
-
|
|
260
|
+
Also supported:
|
|
235
261
|
|
|
236
262
|
```bash
|
|
237
|
-
guardskills add owner/repo --skill <skill-name> --
|
|
263
|
+
guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
238
264
|
```
|
|
239
265
|
|
|
240
|
-
###
|
|
266
|
+
### 3. `skills.sh` Skills
|
|
241
267
|
|
|
242
|
-
Use
|
|
268
|
+
Use the same guarded GitHub flow before install:
|
|
243
269
|
|
|
244
270
|
```bash
|
|
245
|
-
guardskills
|
|
271
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
246
272
|
```
|
|
247
273
|
|
|
248
|
-
If
|
|
274
|
+
If allowed:
|
|
249
275
|
|
|
250
276
|
```bash
|
|
251
|
-
guardskills
|
|
277
|
+
guardskills add owner/repo --skill <skill-name>
|
|
252
278
|
```
|
|
253
279
|
|
|
254
|
-
|
|
280
|
+
### 4. ClawHub Skills
|
|
281
|
+
|
|
282
|
+
Use `scan-clawhub` with either identifier or full URL:
|
|
255
283
|
|
|
256
284
|
```bash
|
|
257
|
-
guardskills scan-
|
|
285
|
+
guardskills scan-clawhub owner/skill-slug
|
|
258
286
|
```
|
|
259
287
|
|
|
260
|
-
### 3. Scan Other Skills
|
|
261
|
-
|
|
262
|
-
"Other skills" means any non-local skill from another GitHub repository.
|
|
263
|
-
|
|
264
|
-
Use:
|
|
265
|
-
|
|
266
288
|
```bash
|
|
267
|
-
guardskills
|
|
289
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug
|
|
268
290
|
```
|
|
269
291
|
|
|
270
|
-
|
|
292
|
+
For machine output:
|
|
271
293
|
|
|
272
294
|
```bash
|
|
273
|
-
guardskills
|
|
295
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug --json
|
|
274
296
|
```
|
|
275
297
|
|
|
298
|
+
If the ClawHub API does not expose GitHub source metadata, `guardskills` falls back to scanning the downloadable ClawHub archive payload.
|
|
299
|
+
|
|
276
300
|
### How OpenClaw Should Interpret Results
|
|
277
301
|
|
|
278
302
|
- `SAFE`: proceed.
|
|
@@ -283,13 +307,25 @@ guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
|
283
307
|
|
|
284
308
|
### Recommended Install Workflow
|
|
285
309
|
|
|
286
|
-
1. Run scan:
|
|
310
|
+
1. Run scan for source type:
|
|
287
311
|
|
|
288
312
|
```bash
|
|
289
313
|
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
290
314
|
```
|
|
291
315
|
|
|
292
|
-
|
|
316
|
+
or
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
guardskills scan-local <path>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
or
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
2. Only if decision is acceptable, run install through guardskills (GitHub/skills.sh flow):
|
|
293
329
|
|
|
294
330
|
```bash
|
|
295
331
|
guardskills add owner/repo --skill <skill-name>
|
|
@@ -301,9 +337,10 @@ Do not run `skills add` directly first.
|
|
|
301
337
|
|
|
302
338
|
```text
|
|
303
339
|
Before installing any skill, always run guardskills first.
|
|
304
|
-
For GitHub skills, run: guardskills add owner/repo --skill <skill-name> --dry-run
|
|
305
340
|
For local skills, run: guardskills scan-local <path>
|
|
306
|
-
|
|
341
|
+
For GitHub or skills.sh skills, run: guardskills add owner/repo --skill <skill-name> --dry-run
|
|
342
|
+
For ClawHub skills, run: guardskills scan-clawhub <owner/slug-or-full-url>
|
|
343
|
+
If SAFE, proceed.
|
|
307
344
|
If WARNING, ask for confirmation.
|
|
308
345
|
If UNSAFE/CRITICAL, block.
|
|
309
346
|
If UNVERIFIABLE, block unless user explicitly requests override.
|