Add CI structure checks for plugin marketplace#6
Merged
Conversation
- scripts/check-structure.py: single self-contained python3 checker for
JSON validity, version sync, SKILL.md frontmatter + description word
budget, internal ${CLAUDE_PLUGIN_ROOT} references, and shell syntax
- .github/workflows/structure-checks.yml: runs on PR + push to main
- Document the checks in README and CLAUDE.md
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review follow-up: the validator rejected several valid inputs.
- Strip trailing sentence punctuation (.,;:]) from ${CLAUDE_PLUGIN_ROOT}
references so a bare ref ending a prose sentence no longer reports a
dangling path
- Skip templated/example ref paths containing placeholders or globs
- Tolerate a leading UTF-8 BOM or blank lines before SKILL.md frontmatter
- Catch missing bash with a clean error instead of an unhandled traceback
- Add 'from __future__ import annotations' so the list[str] annotation runs
on Python 3.7+
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codex review follow-up: a marketplace entry with the correct name and version but a 'source' pointing at a different plugin directory passed all checks, because the version lookup matched the manifest by name while the source path was only checked for the presence of any plugin.json. Load the manifest at the actual 'source' path and verify its name matches the entry before comparing versions, so a mispointed source is caught. Drops the now-unused plugins_by_name lookup in favour of a path-keyed map. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
main.Changes
scripts/check-structure.py— single self-contained checker (python3 stdlib +bashonly), runs identically in CI and locally:marketplace.jsonand allplugin.jsonplugin.jsonversion ==marketplace.jsonregistry versionname/description,namematches directory, description word budget (>40 = error, >30 = warning)${CLAUDE_PLUGIN_ROOT}/...references must exist on diskbash -nsyntax check on all*.shnamematches directory, everyplugins/<name>is registered in the marketplace.github/workflows/structure-checks.yml— runs onpull_request+ push tomain; onlyactions/checkout+ preinstalledpython3, so well under 1 min.README.md/CLAUDE.md— document the local command and that CI enforces the invariants.Readiness
statusline37w,open32w)Test plan
python3 scripts/check-structure.pyexits 0🤖 Generated with Claude Code