Skip to content

fix(hooks): use object schema in hooks.json across vertical plugins#200

Open
darwin7381 wants to merge 1 commit into
anthropics:mainfrom
darwin7381:fix/hooks-json-schema
Open

fix(hooks): use object schema in hooks.json across vertical plugins#200
darwin7381 wants to merge 1 commit into
anthropics:mainfrom
darwin7381:fix/hooks-json-schema

Conversation

@darwin7381
Copy link
Copy Markdown

Summary

  • hooks/hooks.json ships as an empty array ([]) in 4 vertical plugins (financial-analysis, equity-research, private-equity, wealth-management), but Claude Code's plugin loader validates the file against an object schema and rejects with Invalid input: expected object, received array.
  • Aligns the four affected plugins with the working {\"hooks\": {}} format already used by investment-banking.

Reproduction

Captured via `claude --debug-file `:
```
[ERROR] Failed to load hooks for financial-analysis: [
[ERROR] Failed to load hooks for wealth-management: [
[ERROR] Failed to load hooks for private-equity: [
[ERROR] Failed to load hooks for equity-research: [
[DEBUG] Plugin not available for MCP: ... - error type: hook-load-failed
```

Also reproducible via `claude plugin validate `:
```
✘ Found 1 error:
❯ root: Invalid input: expected object, received array
✘ Validation failed
```

Consequences before fix

  • Plugins show as "failed to load" in `claude plugin list`
  • Bundled MCP servers (FactSet, S&P, Daloopa, Morningstar, etc.) are disabled (`hook-load-failed` error type)
  • Skills and slash commands degrade — Claude falls back to LLM-inferred workflows rather than the canonical plugin skills, producing similar-looking but materially different outputs (e.g., no `thesis-tracker` pillar-weight discipline, no `pitch-deck` .pptx template phase)

After fix

  • `claude plugin validate` → `✔ Validation passed` for all four plugins
  • No more `Failed to load hooks` errors in startup log
  • Plugins report enabled in `claude plugin list`
  • MCP servers and skills load as designed

Test plan

  • Ran `claude plugin validate plugins/vertical-plugins/{financial-analysis,equity-research,private-equity,wealth-management}` — all four pass
  • Ran `claude --debug-file` and confirmed no `Failed to load hooks` for the four plugins
  • Verified `investment-banking/hooks/hooks.json` already uses the same `{"hooks": {}}` format and loads cleanly

🤖 Generated with Claude Code

The vertical plugins financial-analysis, equity-research, private-equity,
and wealth-management ship hooks/hooks.json as an empty array (`[]`),
but Claude Code's plugin loader validates the file against an object
schema and rejects it with:

  Invalid input: expected object, received array

Captured via `claude --debug-file <path>`:

  [ERROR] Failed to load hooks for financial-analysis: [
  [ERROR] Failed to load hooks for wealth-management: [
  [ERROR] Failed to load hooks for private-equity: [
  [ERROR] Failed to load hooks for equity-research: [
  [DEBUG] Plugin not available for MCP: ... - error type: hook-load-failed

Consequences:
- Plugins show as "failed to load" in `claude plugin list`
- Bundled MCP servers (FactSet, S&P, Daloopa, etc.) are disabled
- Skills and slash commands degrade — Claude falls back to LLM-inferred
  workflows rather than the canonical plugin skills

`investment-banking` already uses the correct `{"hooks": {}}` schema and
loads cleanly, confirming the desired format.

This change aligns the four affected plugins with that schema so they
load and expose their MCP servers, skills, and slash commands as
intended.
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.

1 participant