docs(plugin-structure): fix hooks.json format with required wrapper#92
docs(plugin-structure): fix hooks.json format with required wrapper#92
Conversation
All hooks.json examples in the plugin-structure skill were missing the required "hooks" wrapper object, which would cause plugins created from these examples to have broken hooks. Updated 4 files to use the correct format: - SKILL.md - examples/standard-plugin.md - examples/advanced-plugin.md - references/component-patterns.md Fixes #90 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Claude finished @sjnims's task in 1m 38s —— View job PR Review: Fix hooks.json format ✅I've completed my review of PR #92. This is a critical documentation fix that corrects incorrect hooks.json examples. SummaryVerdict: Approved ✅ - This PR correctly fixes a critical documentation error that would have caused broken hooks in user plugins. What's Good
Technical VerificationBefore (Incorrect){
"PreToolUse": [...],
"Stop": [...]
}After (Correct){
"hooks": {
"PreToolUse": [...],
"Stop": [...]
}
}This format matches:
Checklist Verification
Impact AssessmentSeverity: High - This was preventing users from correctly implementing hooks This PR should be merged immediately to prevent users from creating broken plugins using the incorrect format from these examples. Tasks Completed
|
Summary
Fixes incorrect hooks.json examples in the plugin-structure skill that were missing the required
"hooks"wrapper object.Problem
Fixes #90
All hooks.json examples in the plugin-structure skill showed an incorrect format that would cause plugins created from these examples to have broken hooks. The examples were missing the required
"hooks"wrapper:Before (incorrect):
{ "PreToolUse": [...] }After (correct):
{ "hooks": { "PreToolUse": [...] } }Solution
Updated all 4 affected files to use the correct wrapper format, consistent with the hook-development skill and official documentation:
plugins/plugin-dev/skills/plugin-structure/SKILL.mdplugins/plugin-dev/skills/plugin-structure/examples/standard-plugin.mdplugins/plugin-dev/skills/plugin-structure/examples/advanced-plugin.mdplugins/plugin-dev/skills/plugin-structure/references/component-patterns.mdAlternatives Considered
None - this is a documentation correctness fix with a single correct answer.
Changes
"hooks"wrapper object to all hooks.json code examplesTesting
🤖 Generated with Claude Code