anthropics / anthropics/financial-services

All vertical plugins fail to load in Claude Code: hooks.json schema mismatch

Aberta
#175 0 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
34.8k
Forks
5.2k
Merge médio
2h 2min
PRs com merge (30d)
3

Descrição

## Summary

Installing any vertical plugin from this marketplace into Claude Code (e.g. `equity-research`) succeeds but the plugin then fails to load with a schema validation error on `hooks/hooks.json`.

## Reproduction

```bash
claude plugin marketplace add https://github.com/anthropics/financial-services
claude plugin install equity-research@claude-for-financial-services
claude plugin list
```

Result:

```
❯ equity-research@claude-for-financial-services
Version: 0.1.0
Scope: user
Status: ✘ failed to load
Error: Hook load failed: [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received array"
}
]
```

After patching `hooks.json` to `{}`, a second error appears:

```
Error: Hook load failed: [
{
"expected": "record",
"code": "invalid_type",
"path": ["hooks"],
"message": "Invalid input: expected record, received undefined"
}
]
```

## Root cause

`plugins/vertical-plugins/*/hooks/hooks.json` ships as `[]` (empty array) in every vertical plugin. Claude Code's hook schema requires an object with a `hooks` key:

```json
{
"hooks": {
"SessionStart": [ ... ]
}
}
```

The minimal valid form for a plugin with no hooks is `{"hooks": {}}`, not `[]` or `{}`.

## Affected plugins

Confirmed in all 5 vertical plugins:
- `plugins/vertical-plugins/equity-research/hooks/hooks.json`
- `plugins/vertical-plugins/financial-analysis/hooks/hooks.json`
- `plugins/vertical-plugins/wealth-management/hooks/hooks.json`
- `plugins/vertical-plugins/private-equity/hooks/hooks.json`
- `plugins/vertical-plugins/investment-banking/hooks/hooks.json`

Each file currently contains `[]`.

## Suggested fix

Replace `[]` with `{"hooks": {}}` in all 5 files. After this change, plugins load successfully and skills/commands become available.

## Workaround for users

```bash
for f in $(find ~/.claude/plugins -path '*/claude-for-financial-services/*' -name 'hooks.json'); do
echo '{"hooks": {}}' > "$f"
done
claude plugin list
```

## Environment

- Claude Code (latest as of 2026-05-11)
- macOS Darwin 25.3.0
- Plugin marketplace version: 0.1.0

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.