Claude Code /doctor reports a hook load failure for this plugin (v2.1.0 / latest):
Hook load failed: expected array, received undefined
path: ["hooks","PreToolUse",0,"hooks"]
path: ["hooks","PreToolUse",1,"hooks"]
path: ["hooks","PostToolUse",0,"hooks"]
path: ["hooks","PostToolUse",1,"hooks"]
Cause
In hooks/hooks.json, each matcher entry places type/command/timeout directly on the matcher object. The current Claude Code hooks schema requires those to be nested inside a hooks array per matcher entry. Because the hooks key is missing, validation fails and none of the plugin hooks load.
Current (invalid)
"PreToolUse": [
{
"matcher": "generate_tts|generate_music|...",
"type": "command",
"command": "sh scripts/check-mcp-server.sh remotion-media KIE_API_KEY",
"timeout": 5000
}
]
Fix (valid)
"PreToolUse": [
{
"matcher": "generate_tts|generate_music|...",
"hooks": [
{
"type": "command",
"command": "sh scripts/check-mcp-server.sh remotion-media KIE_API_KEY",
"timeout": 5000
}
]
}
]
Same wrapping is needed for both PreToolUse entries and both PostToolUse entries.
Environment
- Claude Code on macOS (Darwin 23.6.0)
- Plugin: remotion-superpowers @ dojocodinglabs, v2.1.0
Happy to open a PR if useful.
Claude Code
/doctorreports a hook load failure for this plugin (v2.1.0 / latest):Cause
In
hooks/hooks.json, each matcher entry placestype/command/timeoutdirectly on the matcher object. The current Claude Code hooks schema requires those to be nested inside ahooksarray per matcher entry. Because thehookskey is missing, validation fails and none of the plugin hooks load.Current (invalid)
Fix (valid)
Same wrapping is needed for both
PreToolUseentries and bothPostToolUseentries.Environment
Happy to open a PR if useful.