Skip to content

feat(check): add --json flag to check command#664

Open
DaleSeo wants to merge 1 commit intovercel-labs:mainfrom
DaleSeo:feat/check-json-flag
Open

feat(check): add --json flag to check command#664
DaleSeo wants to merge 1 commit intovercel-labs:mainfrom
DaleSeo:feat/check-json-flag

Conversation

@DaleSeo
Copy link

@DaleSeo DaleSeo commented Mar 16, 2026

Closes #663

Summary

Adds a --json flag to skills check that outputs structured JSON to stdout. This enables CI scripts and other tooling to programmatically detect stale skills without parsing ANSI-colored text. Follows the same pattern established by #558 (list --json).

Output format

$ npx skills check --json
[
  { "name": "my-skill-1", "source": "owner/repo" },
  { "name": "my-skill-2", "source": "owner/repo" }
]

Key properties:

  • No ANSI escape codes in output
  • Empty array [] when no updates available or no skills tracked
  • Output is always a JSON array, consistent with skills list --json

Changes

File Change
src/cli.ts Parse --json flag, output JSON array, suppress human-readable output in JSON mode, add help text and example
src/cli.test.ts 3 new tests (valid JSON output, array structure, no ANSI codes)

Tests

All 12 CLI tests pass (3 new).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add --json flag to skills check

1 participant