fix(plugins): hooks.json must be {"hooks": {}} not []; add plugin-validate CI

The empty-array hooks.json in private-equity, financial-analysis,
equity-research and wealth-management caused those plugins to fail to
load ("Hook load failed: expected object, received array"). Replace [] with
the minimal valid {"hooks": {}} object in all four.

Add a plugin-validate workflow that runs the official `claude plugin
validate` over the marketplace manifest and every plugin on each PR and
push, so a malformed manifest fails CI instead of reaching users. The
CLI is installed from the official binary channel and cached, keyed on a
pinned version, so a warm cache skips the download entirely.
This commit is contained in:
Omar Mihilmy
2026-05-18 13:08:48 -04:00
parent 379e414f98
commit dcb0d4be25
9 changed files with 74 additions and 8 deletions
+58
View File
@@ -0,0 +1,58 @@
name: plugin-validate
# Runs the official Claude Code plugin linter over every plugin and the
# marketplace manifest. Catches malformed manifests (e.g. hooks.json as a
# bare [] instead of {"hooks": {}}) before they reach users.
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
env:
# Pinned for reproducible builds + a stable cache key. Bump by setting this
# to a newer version from https://downloads.claude.ai/claude-code-releases/stable
CLAUDE_VERSION: 2.1.133
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Claude Code CLI
id: cli-cache
uses: actions/cache@v4
with:
path: ~/.local/bin/claude
key: claude-cli-${{ runner.os }}-${{ env.CLAUDE_VERSION }}
- name: Install Claude Code CLI
if: steps.cli-cache.outputs.cache-hit != 'true'
run: curl -fsSL https://claude.ai/install.sh | bash -s "$CLAUDE_VERSION"
- name: Validate marketplace + every plugin
run: |
set -euo pipefail
export PATH="$HOME/.local/bin:$PATH"
claude --version
fail=0
echo "::group::marketplace"
claude plugin validate .claude-plugin/marketplace.json || fail=1
echo "::endgroup::"
while IFS= read -r manifest; do
plugin_dir="$(dirname "$(dirname "$manifest")")"
echo "::group::$plugin_dir"
claude plugin validate "$plugin_dir" || fail=1
echo "::endgroup::"
done < <(find plugins -path '*/.claude-plugin/plugin.json' | sort)
if [ "$fail" -ne 0 ]; then
echo "::error::plugin validation failed — see grouped logs above"
exit 1
fi
@@ -1,6 +1,6 @@
{
"name": "equity-research",
"version": "0.1.0",
"version": "0.1.1",
"description": "Equity research tools: earnings analysis, initiating coverage reports, and research workflows",
"author": {
"name": "Anthropic FSI"
@@ -1 +1,3 @@
[]
{
"hooks": {}
}
@@ -1,6 +1,6 @@
{
"name": "financial-analysis",
"version": "0.1.0",
"version": "0.1.1",
"description": "Core financial modeling and analysis tools: DCF, comps, LBO, 3-statement models, competitive analysis, and deck QC",
"author": {
"name": "Anthropic FSI"
@@ -1 +1,3 @@
[]
{
"hooks": {}
}
@@ -1,6 +1,6 @@
{
"name": "private-equity",
"version": "0.1.0",
"version": "0.1.1",
"description": "Private equity deal sourcing and workflow tools: company discovery, CRM integration, and founder outreach",
"author": {
"name": "Anthropic FSI"
@@ -1 +1,3 @@
[]
{
"hooks": {}
}
@@ -1,6 +1,6 @@
{
"name": "wealth-management",
"version": "0.1.0",
"version": "0.1.1",
"description": "Wealth management and financial advisory tools: client reviews, financial planning, portfolio analysis, and client reporting",
"author": {
"name": "Anthropic FSI"
@@ -1 +1,3 @@
[]
{
"hooks": {}
}