Skip to content

CI: run claude plugin validate to catch plugin-spec drift #4

@wzslr321

Description

@wzslr321

Our Go validator (go run ./cmd/validate-plugins) checks our own conventions, but it can't know about the actual current Claude Code plugin schema. The official validator can:

claude plugin validate .            # validates .claude-plugin/marketplace.json + every plugin
claude plugin validate plugins/<p>  # validates a single plugin manifest

On current main it reports 1 warning:

  • stability: Unknown field 'stability'. Claude Code ignores it at load time. — not part of the plugin.json schema.

Proposal

Add a CI job that runs claude plugin validate .:

  • Install the CLI in the runner (npm install -g @anthropic-ai/claude-code) — validation is local/offline, no API key needed.
  • Phase 1: fail on errors only (the command exits 0 on warnings — ✔ Validation passed with warnings), so it lands green today and catches new spec violations (typos in manifests, malformed hooks.json, bad skill frontmatter) and future schema drift as Claude Code evolves.
  • Phase 2: with only the single stability warning outstanding, deciding what to do with that field gets us to --strict (warnings fail too) almost immediately.

Worth pinning the CLI version in CI (schema warnings can change between releases) and bumping it deliberately.

This originated as leancodepl/ai-plugins-internal#26, but per the public → internal content-flow direction it belongs here first — and the resulting PR doubles as a test case for the public → internal sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions