ci: validate plugin and marketplace manifests on every PR - #12
Open
mpicciolli wants to merge 3 commits into
Open
ci: validate plugin and marketplace manifests on every PR#12mpicciolli wants to merge 3 commits into
mpicciolli wants to merge 3 commits into
Conversation
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>
There was a problem hiding this comment.
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.mdtesting instructions to document the intended local/CI validation commands and key gotchas. - Adds
.prettierignorefor 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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The manifests at the repo root are read straight from git by everyone who adds this
marketplace — merging to
mainis the release. A broken relative path or a stale manifestships silently, with no build step to catch it.
claude plugin validate --strictis an offline schema check (no API key, no network — verifiedwith an empty
HOMEand noANTHROPIC_API_KEY), which makes CI the right home for it. Apre-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 onpull_requestandpushtomain:claude plugin validate --strict .(marketplace manifest)plugins/*/so a new plugin is covered without touching the workflowpython3 -m json.toolon the Codex manifests and.mcp.json, which have no validatorbash -non every script,prettier --checkon Markdown and JSONAGENTS.md— "Testing Instructions" rewritten with the exact commands and the threegotchas:
.stops at the first manifest so it only validates the marketplace, a skilldirectory is not a valid target (skills are validated through their plugin), and what
--strictactually escalates..prettierignore— for.claude/settings.local.json, which is ignored via a globalgitignore and so absent from a CI checkout; without this the local run disagrees with CI.
prettier --check(
.codex-plugin/plugin.json,references/database-schema.md) — cosmetic only, but CI wouldbe red on the first run otherwise.
Tested with
claude plugin validate --stricton a deliberately invalid manifest → exit 1, so CI failsas intended.
HOME=<empty> env -u ANTHROPIC_API_KEY claude plugin validate --strict .→ exit 0, confirmingno credentials are needed.
The first CI run on this PR is the real check of the workflow itself.
🤖 Generated with Claude Code