Skip to content

fix(plugins): hooks.json schema — replace bare [] with {"hooks": {}}#88

Open
carlos-ecodigital wants to merge 1 commit intoanthropics:mainfrom
carlos-ecodigital:fix/hooks-json-schema
Open

fix(plugins): hooks.json schema — replace bare [] with {"hooks": {}}#88
carlos-ecodigital wants to merge 1 commit intoanthropics:mainfrom
carlos-ecodigital:fix/hooks-json-schema

Conversation

@carlos-ecodigital
Copy link
Copy Markdown

Fixes #86.

Four plugins ship hooks/hooks.json containing a bare empty array []. Claude Code's plugin loader rejects this with a schema validation error, so the plugins install but fail to load:

Hook load failed: [{"expected":"object","code":"invalid_type","path":[],
 "message":"Invalid input: expected object, received array"}]

Replacing with {"hooks": {}} matches the schema already shipping in investment-banking@0.2.0 and unblocks all four.

Files changed

  • plugins/vertical-plugins/financial-analysis/hooks/hooks.json
  • plugins/vertical-plugins/private-equity/hooks/hooks.json
  • plugins/vertical-plugins/equity-research/hooks/hooks.json
  • plugins/vertical-plugins/wealth-management/hooks/hooks.json

Diff per file is one character: []{"hooks": {}}.

Verification

claude plugin marketplace add anthropics/financial-services-plugins
claude plugin install financial-analysis@claude-for-financial-services
claude plugin list
# Before: Status: ✘ failed to load
# After:  Status: ✔ enabled

Alternative considered

Deleting the empty hooks/ directories (suggested by @MkhIr in the issue thread) would also work and is arguably cleaner. Going with {"hooks": {}} here for consistency with investment-banking@0.2.0 — happy to switch to the directory-removal approach if maintainers prefer.

Four plugins ship hooks/hooks.json containing a bare empty array `[]`,
which Claude Code's plugin loader rejects with:

  Hook load failed: [{"expected":"object","code":"invalid_type","path":[],
   "message":"Invalid input: expected object, received array"}]

This causes the affected plugins to install but fail to load. Replacing
with `{"hooks": {}}` matches the schema already shipping in
investment-banking@0.2.0 and unblocks all four.

Affected:
- plugins/vertical-plugins/financial-analysis/hooks/hooks.json
- plugins/vertical-plugins/private-equity/hooks/hooks.json
- plugins/vertical-plugins/equity-research/hooks/hooks.json
- plugins/vertical-plugins/wealth-management/hooks/hooks.json

Closes anthropics#86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hooks.json schema bug: 4 plugins ship with bare "[]" causing load failures

1 participant