Skip to content

Commit bd04eac

Browse files
wzslr321claude
andcommitted
ci: validate against the official Claude Code plugin schema
Add a `spec` job to the Validate plugins workflow that installs the Claude Code CLI (pinned to 2.1.173 — schema warnings can change between releases, so bumps should be deliberate) and runs `claude plugin validate .` offline. Phase 1 of #4: the command exits 0 on warnings, so this lands green on current main (1 known warning: `stability` in one plugin.json) while failing on real schema errors — manifest typos, malformed hooks.json, bad skill frontmatter — and future spec drift. Phase 2 (--strict) comes once the `stability` field question is settled. Closes #4 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a5c2f50 commit bd04eac

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/validate-plugins.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,25 @@ jobs:
2525

2626
- name: Validate plugin structure
2727
run: go run ./cmd/validate-plugins
28+
29+
spec:
30+
name: Claude Code plugin spec check
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 5
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 22
41+
42+
# Pinned: schema warnings can change between CLI releases; bump deliberately.
43+
- name: Install Claude Code CLI
44+
run: npm install -g @anthropic-ai/claude-code@2.1.173
45+
46+
# Phase 1: fails on schema errors only; warnings pass (exit 0).
47+
# Phase 2: add --strict once the manifest cleanup lands — see issue #4.
48+
- name: Validate against the Claude Code plugin schema
49+
run: claude plugin validate .

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Validate plugin structure locally with Go:
4646
go run ./cmd/validate-plugins
4747
```
4848

49-
CI runs the same structure validation plus Go formatting/lint on every PR. After pushing, watch CI with `gh pr checks <pr-number>`.
49+
CI runs the same structure validation, Go formatting/lint, and the official Claude Code plugin-spec check (`claude plugin validate .`, errors-only for now) on every PR. After pushing, watch CI with `gh pr checks <pr-number>`.
5050

5151
## Platform notes
5252

0 commit comments

Comments
 (0)