skill-check 0.1.0 → 1.0.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 CHANGED
@@ -4,12 +4,10 @@ Linter for agent skill files — validates SKILL.md files against the spec with
4
4
 
5
5
  ![skill-check demo](docs/assets/skill-check-demo.gif)
6
6
 
7
- Regenerate with `pnpm run demo:readme` (source: `scripts/readme-demo.tape`).
8
-
9
7
  ## Install
10
8
 
11
9
  ```bash
12
- npx skill-check check .
10
+ npx skill-check .
13
11
  ```
14
12
 
15
13
  Global install via curl:
@@ -29,13 +27,15 @@ brew install skill-check
29
27
 
30
28
  | Command | Description |
31
29
  |---|---|
32
- | `skill-check check [path]` | Run validation (and optional security scan) |
30
+ | `skill-check [path\|github-url]` | Shorthand for `skill-check check [path\|github-url]` |
31
+ | `skill-check check [path\|github-url]` | Run validation (and optional security scan) |
32
+ | `skill-check split-body [path]` | Preview/apply section-based body split into `references/*.md` |
33
33
  | `skill-check new <name>` | Scaffold a new skill directory with SKILL.md template |
34
- | `skill-check watch [path]` | Watch for changes and re-run validation on save |
34
+ | `skill-check watch [path]` | Watch local paths for changes and re-run validation on save |
35
35
  | `skill-check diff <a> <b>` | Compare diagnostics between two skill directories |
36
- | `skill-check report [path]` | Generate a markdown health report |
36
+ | `skill-check report [path\|github-url]` | Generate a markdown health report |
37
37
  | `skill-check rules [id]` | List all rules, or show detail for a specific rule |
38
- | `skill-check security-scan [path]` | Run security scan via agent-scan (mcp-scan) |
38
+ | `skill-check security-scan [path\|github-url]` | Run security scan via agent-scan (mcp-scan) |
39
39
  | `skill-check init` | Create `skill-check.config.json` template |
40
40
 
41
41
  ### check options
@@ -46,8 +46,11 @@ brew install skill-check
46
46
  | `--fix --interactive` | Prompt before applying each fix (TTY only) |
47
47
  | `--baseline <path>` | Compare against a previous JSON run and show new/fixed counts |
48
48
  | `--format <fmt>` | Output format (see below) |
49
+ | `--share` | Render a share card (text format only) |
50
+ | `--share-out <path>` | Save a share image file (default: `./skill-check-share.png`) |
49
51
  | `--no-open` | Skip auto-opening HTML reports |
50
52
  | `--no-security-scan` | Skip the security scan |
53
+ | `--security-scan-verbose` | Show full raw `agent-scan` output (default is compact summary) |
51
54
  | `--strict` | Treat warnings as errors |
52
55
  | `--lenient` | Relax selected strict rules |
53
56
  | `--fail-on-warning` | Exit non-zero when warnings exist |
@@ -64,9 +67,9 @@ brew install skill-check
64
67
 
65
68
  **HTML reports** are written to `skill-check-report.html` (or `output.reportPath`). In an interactive terminal the report opens in your browser automatically; use `--no-open` to skip.
66
69
 
67
- **View locally:** `npx skill-check check . --format html` or open the file directly: `open skill-check-report.html` (macOS).
70
+ **View locally:** `npx skill-check . --format html` or open the file directly: `open skill-check-report.html` (macOS).
68
71
 
69
- The `text` formatter includes quality score bars per skill, colorized severity badges, and boxed summaries.
72
+ The `text` formatter includes quality score bars per skill, colorized severity badges, and a share-friendly shield card with the exact runnable `npx skill-check ...` command (including GitHub URL targets when used).
70
73
  An ASCII CLI banner is shown in interactive text mode; set `SKILL_CHECK_NO_BANNER=1` to disable it.
71
74
 
72
75
  ## Quality Scores
@@ -131,18 +134,19 @@ npx skill-check init --interactive
131
134
  `skill-check` can validate repos or direct skills directories:
132
135
 
133
136
  ```bash
134
- npx skill-check check /path/to/repo
137
+ npx skill-check /path/to/repo
135
138
  npx skill-check check ~/.claude/skills
136
139
  ```
137
140
 
138
141
  `check` runs the security scan by default.
139
- If dependencies are missing, `skill-check` asks before installing in interactive terminals.
140
- In non-interactive/CI environments, use `--allow-installs` to permit automatic installs.
142
+ If dependencies are missing, `skill-check` automatically installs scanner dependencies by default.
143
+ Use `--no-installs` to hard-block automatic installs.
144
+ By default, `skill-check` prints a compact security summary; use `--security-scan-verbose` for full scanner details.
141
145
 
142
146
  Run security scan without UV by forcing `pipx`:
143
147
 
144
148
  ```bash
145
- npx skill-check security-scan . --security-scan-runner pipx --allow-installs
149
+ npx skill-check security-scan . --security-scan-runner pipx
146
150
  ```
147
151
 
148
152
  Run validation + security scan in one pipeline step with explicit runner:
@@ -193,12 +197,39 @@ Use GitHub annotations in CI:
193
197
  npx skill-check check . --format github --no-security-scan
194
198
  ```
195
199
 
200
+ Generate a screenshot-friendly social summary card:
201
+
202
+ ```bash
203
+ npx skill-check https://github.com/thedaviddias/skill-check --share --no-security-scan
204
+ ```
205
+
206
+ By default this also writes `skill-check-share.png` in your current directory.
207
+ Set a custom output path with `--share-out path/to/card.png`.
208
+
196
209
  Hard-block dependency installs:
197
210
 
198
211
  ```bash
199
212
  npx skill-check check . --no-installs
200
213
  ```
201
214
 
215
+ ## Remote GitHub URLs
216
+
217
+ `skill-check` supports scanning GitHub repos directly without a manual clone:
218
+
219
+ ```bash
220
+ npx skill-check https://github.com/thedaviddias/skill-check --no-security-scan
221
+ npx skill-check https://github.com/thedaviddias/skill-check/tree/main/skills --no-security-scan
222
+ ```
223
+
224
+ Remote URL scanning behavior:
225
+
226
+ - Creates an ephemeral shallow clone (`git clone --depth 1`) in a temp directory.
227
+ - Cleans up the checkout automatically after the command finishes.
228
+ - Shows remote preparation progress on stderr (spinner in TTY, `[remote]` status lines in non-TTY/CI).
229
+ - Keeps security scan enabled by default (same as local path behavior).
230
+ - Does not support `--fix` for URL targets (read-only workflow).
231
+ - `watch` and `diff` are local-path only in this version.
232
+
202
233
  ## Auto-fix Coverage
203
234
 
204
235
  `--fix` currently handles deterministic formatting/metadata issues:
@@ -217,6 +248,30 @@ Rules requiring human intent (content quality, max-length trimming, broken links
217
248
 
218
249
  Use `--fix --interactive` for per-diagnostic approval prompts (requires TTY).
219
250
 
251
+ ## Split Oversized Skill Bodies
252
+
253
+ When `body.max_lines` fails, use `split-body` to extract `##` sections into `references/*.md`.
254
+
255
+ Preview first (no writes):
256
+
257
+ ```bash
258
+ npx skill-check split-body <skill-dir-or-file>
259
+ ```
260
+
261
+ Apply changes:
262
+
263
+ ```bash
264
+ npx skill-check split-body <skill-dir-or-file> --write
265
+ ```
266
+
267
+ Notes:
268
+
269
+ - Split is deterministic and section-based (`##` headings).
270
+ - If a long body has no `##` headings, the command reports a blocked plan and explains what to add.
271
+ - `split-body` is local-path only (no GitHub URL mutation flow in v1).
272
+ - After writing, run `npx skill-check check <skill-dir-or-file> --no-security-scan`.
273
+ - For editorial cleanup, use `docs/skills/split-into-references/SKILL.md` or [the published copy](https://github.com/thedaviddias/skill-check/blob/main/docs/skills/split-into-references/SKILL.md).
274
+
220
275
  ## GitHub Action
221
276
 
222
277
  Use `skill-check` directly in workflows:
@@ -346,7 +401,7 @@ All rules emit actionable `suggestion` text to guide fixes.
346
401
  Releases are automated with [semantic-release](https://github.com/semantic-release/semantic-release). Pushing to `main` (after CI passes) runs the release workflow: commits are analyzed for [Conventional Commits](https://www.conventionalcommits.org/) (`fix:`, `feat:`, `BREAKING CHANGE:`), the version is bumped, `CHANGELOG.md` is updated, the package is published to npm, and a GitHub release is created.
347
402
 
348
403
  - **Commit messages** are validated locally by [commitlint](https://commitlint.js.org/) (enforced by the `commit-msg` hook). Use `fix:`, `feat:`, `docs:`, `chore:`, etc.
349
- - **Secrets:** In GitHub, set the `NPM_TOKEN` repository secret (npm automation token with publish scope) so the workflow can publish to npm. `GITHUB_TOKEN` is provided automatically.
404
+ - **npm auth:** Use [npm Trusted Publishing (OIDC)](https://docs.npmjs.com/trusted-publishers) so you don’t need `NPM_TOKEN`. On [npmjs.com](https://www.npmjs.com/) go to the **skill-check** package → **Settings** → **Trusted publishing** → add a GitHub Actions publisher with workflow filename **`publish.yml`** (exact name, including extension). Then the workflow can publish without any npm token. Alternatively, set the `NPM_TOKEN` repository secret for token-based publish.
350
405
 
351
406
  To simulate a release locally (without publishing): `pnpm run release:dry-run`. It will fail `verifyConditions` without `NPM_TOKEN` and `GITHUB_TOKEN`; in CI both are set.
352
407
 
@@ -2,4 +2,5 @@ export interface CliIO {
2
2
  stdout: (text: string) => void;
3
3
  stderr: (text: string) => void;
4
4
  }
5
+ export declare function normalizeRootCommandArgs(argv: string[]): string[];
5
6
  export declare function runCli(argv: string[], io?: CliIO): Promise<number>;