anthropics / anthropics/financial-services

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

未關閉
#175 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
34.8k
分支
5.2k
平均合併
2 小時 2 分鐘
30 天內合併 PR
3

描述

## 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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。