From 8bda663d42af4a27ba6b21708fcf49bcda1c86fb Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 27 May 2026 16:09:30 +0000 Subject: [PATCH] Add CI to validate plugin and marketplace manifests Run `claude plugin validate --strict` on the plugin and marketplace manifests, and shellcheck the hook scripts, on push to master and on pull requests. https://claude.ai/code/session_01BDX5Wh7CXx1hXbfJCyBmMN --- .github/workflows/validate.yml | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..61583e1 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,39 @@ +name: Validate + +on: + push: + branches: [master] + pull_request: + +permissions: + contents: read + +jobs: + manifests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install Claude Code + run: npm install -g @anthropic-ai/claude-code + - name: Validate plugin manifest + run: claude plugin validate .claude-plugin/plugin.json --strict + - name: Validate marketplace manifest + if: hashFiles('.claude-plugin/marketplace.json') != '' + run: claude plugin validate .claude-plugin/marketplace.json --strict + + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: ShellCheck hook scripts + run: | + shopt -s nullglob + scripts=(hooks/scripts/*.sh) + if [ ${#scripts[@]} -eq 0 ]; then + echo "No hook scripts to check." + exit 0 + fi + shellcheck "${scripts[@]}"