Repository navigation
feat: add plugin validation CI - #138
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the repository's continuous integration by introducing automated validation for plugin definitions and their marketplace metadata. It establishes new CI checks to enforce consistent plugin structure and data integrity, ensuring that all plugins adhere to defined standards and that the marketplace manifest accurately reflects the state of individual plugins. This proactively identifies potential issues, improving overall plugin reliability and maintainability. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces validation scripts for plugins and the marketplace, which is a great addition for maintaining repository integrity. My review focuses on improving the efficiency of the shell scripts and ensuring the validation is comprehensive. I've suggested a change in validate-marketplace.sh to use a more efficient jq and while read pattern, and an update to validate-plugin-structure.sh to align its checks with the provided plugin.schema.json by including validation for the author field. I've also updated both scripts to use printf instead of echo.
There was a problem hiding this comment.
Pull request overview
Adds lightweight CI and helper scripts to validate Claude Code plugin manifests and marketplace metadata consistency.
Changes:
- Add
scripts/validate-plugin-structure.shto validate each plugin’s.claude-plugin/plugin.json(JSON + required fields) and presence ofREADME.md. - Add
scripts/validate-marketplace.shto validate.claude-plugin/marketplace.jsonsyntax and consistency with referenced plugin directories/manifests. - Add
.github/workflows/validate-plugins.ymlto run the above validations on PRs that touch plugin paths.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/validate-plugin-structure.sh | New repo-wide plugin manifest + README structural validator. |
| scripts/validate-marketplace.sh | New marketplace consistency validator against per-plugin manifests. |
| .github/workflows/validate-plugins.yml | New PR workflow to run the two validation scripts when plugin paths change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Per owner feedback: custom scripts shouldn't exist. The existing validate-plugin.yml already covers validation with official tools (cclint, check-jsonschema, bats). The validate-plugins.yml workflow and its two shell scripts are redundant and unmaintained one-offs. Marketplace.json version bumps (content-guards, github-workflows, process-cleanup) are retained as correct independent changes. (claude)
|
Addressing all review threads in commit 61a1e2f: Owner feedback (scripts/validate-marketplace.sh, scripts/validate-plugin-structure.sh): Removed both custom scripts and the duplicate Copilot thread (PRRT_kwDOQx7E5c51Hl7c — duplicate CI): Resolved by deletion. Copilot thread (PRRT_kwDOQx7E5c51Hl7C — paths filter): Resolved by deletion. Copilot thread (PRRT_kwDOQx7E5c51Hl7w — jq under set -e): Resolved by deletion. Gemini threads (jq loop performance, author.name field): Resolved by deletion — improvements to scripts that no longer exist. Remaining changes: marketplace.json version bumps for content-guards, github-workflows, and process-cleanup (correct and retained). |
Summary
validate-plugins.ymlworkflow triggered on PRs that touch plugin paths (.claude-plugin/directories)scripts/validate-plugin-structure.shto verify every plugin has valid JSON in.claude-plugin/plugin.jsonwith required fields (name, version, description) and a README.mdscripts/validate-marketplace.shto verify.claude-plugin/marketplace.jsonconsistency: valid JSON, referenced directories exist, and versions/names match individual plugin.json filesNote: The marketplace validation will flag 3 existing version mismatches (content-guards, github-workflows, process-cleanup) where plugin.json has been bumped but marketplace.json was not updated. These should be fixed in a separate PR.
Test plan
validate-plugins.ymltriggers on PRs touching*/.claude-plugin/**or.claude-plugin/**bash scripts/validate-plugin-structure.shlocally — all 15 plugins passbash scripts/validate-marketplace.shlocally — correctly flags 3 version mismatchesset -euo pipefailGenerated with Claude Code