Skip to content

feat: add --json flag to skills check#675

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

feat: add --json flag to skills check#675
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:feat/check-json-flag

Conversation

@elliotllliu
Copy link
Contributor

Summary

Fixes #663 — adds a --json flag to skills check for machine-readable output.

Usage

# Machine-readable output
npx skills check --json
# [{"name":"apollo-mcp-server","source":"apollographql/skills"}, ...]

# Human-readable output (unchanged)
npx skills check

CI Example

updates=$(npx skills check --json | jq 'length')
if [ "$updates" -gt 0 ]; then
  npx skills update
fi

Changes

  • runCheck() parses --json flag from args
  • When set: suppresses ANSI output, prints JSON array of {name, source} objects
  • Empty array [] when no skills or no updates
  • Help text and examples updated
  • Human-readable output completely unchanged without the flag

Output a machine-readable JSON array of available updates when
`--json` is passed, enabling CI/scripting use cases:

  npx skills check --json
  # [{"name":"my-skill","source":"owner/repo"}, ...]

When no updates are available, outputs an empty array `[]`.
Human-readable output is unchanged without the flag.

Fixes vercel-labs#663
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