Skip to content

ci: validate plugin and marketplace manifests on every PR - #12

Open
mpicciolli wants to merge 3 commits into
mainfrom
ci/plugin-validate
Open

ci: validate plugin and marketplace manifests on every PR#12
mpicciolli wants to merge 3 commits into
mainfrom
ci/plugin-validate

Conversation

@mpicciolli

Copy link
Copy Markdown
Contributor

Why

The manifests at the repo root are read straight from git by everyone who adds this
marketplace — merging to main is the release. A broken relative path or a stale manifest
ships silently, with no build step to catch it.

claude plugin validate --strict is an offline schema check (no API key, no network — verified
with an empty HOME and no ANTHROPIC_API_KEY), which makes CI the right home for it. A
pre-commit or pre-push hook would be unversioned, require manual installation by each
contributor, and be skippable with --no-verify.

What

  • .github/workflows/validate.yml — runs on pull_request and push to main:
    • claude plugin validate --strict . (marketplace manifest)
    • the same, looped over plugins/*/ so a new plugin is covered without touching the workflow
    • python3 -m json.tool on the Codex manifests and .mcp.json, which have no validator
    • bash -n on every script, prettier --check on Markdown and JSON
  • AGENTS.md — "Testing Instructions" rewritten with the exact commands and the three
    gotchas: . stops at the first manifest so it only validates the marketplace, a skill
    directory is not a valid target (skills are validated through their plugin), and what
    --strict actually escalates.
  • .prettierignore — for .claude/settings.local.json, which is ignored via a global
    gitignore and so absent from a CI checkout; without this the local run disagrees with CI.
  • Formatted the two tracked files that already failed prettier --check
    (.codex-plugin/plugin.json, references/database-schema.md) — cosmetic only, but CI would
    be red on the first run otherwise.

Tested with

  • Full pipeline run locally: all steps green.
  • claude plugin validate --strict on a deliberately invalid manifest → exit 1, so CI fails
    as intended.
  • HOME=<empty> env -u ANTHROPIC_API_KEY claude plugin validate --strict . → exit 0, confirming
    no credentials are needed.

The first CI run on this PR is the real check of the workflow itself.

🤖 Generated with Claude Code

The manifests at the root are read straight from git by anyone adding this
marketplace, so merging to main is the release and a broken manifest ships
silently. `claude plugin validate --strict` is an offline schema check that
needs no API key, which makes CI the natural place for it — a git hook would
be unversioned and skippable.

Also format the two tracked files that already failed `prettier --check`, and
ignore the local-only .claude/settings.local.json so the local run matches CI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 13:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI validation to prevent shipping broken plugin/marketplace manifests (this repo’s “release” is merging to main) and updates contributor guidance to match the intended validation workflow.

Changes:

  • Introduces a GitHub Actions workflow to validate manifests and enforce formatting on PRs and pushes to main.
  • Updates AGENTS.md testing instructions to document the intended local/CI validation commands and key gotchas.
  • Adds .prettierignore for the local-only Claude settings file and applies Prettier formatting fixes to existing tracked files.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/validate.yml New CI workflow to validate manifests and run formatting checks.
AGENTS.md Documents the validation commands and clarifies how claude plugin validate --strict behaves.
.prettierignore Excludes local-only .claude/settings.local.json so local Prettier runs match CI.
plugins/db-editor/.codex-plugin/plugin.json Prettier-only formatting (inline capabilities array).
plugins/db-editor/skills/pcm-database/references/database-schema.md Prettier-only formatting for a Markdown table.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +21 to +32
- name: Validate marketplace manifest
run: claude plugin validate --strict .

- name: Validate plugin manifests
run: |
for plugin in plugins/*/; do
echo "==> $plugin"
claude plugin validate --strict "$plugin"
done

- name: Check formatting
run: npx --yes prettier --check "**/*.{md,json}"
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.

2 participants