-
Notifications
You must be signed in to change notification settings - Fork 8
fix(hooks): conform hooks.json to Claude Code plugin hook schema (fixes plugin failing to load) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,29 +3,45 @@ | |||||
| "PreToolUse": [ | ||||||
| { | ||||||
| "matcher": "generate_tts|generate_music|generate_sfx|generate_image|generate_video|generate_subtitles|list_assets", | ||||||
| "type": "command", | ||||||
| "command": "sh scripts/check-mcp-server.sh remotion-media KIE_API_KEY", | ||||||
| "timeout": 5000 | ||||||
| "hooks": [ | ||||||
| { | ||||||
| "type": "command", | ||||||
| "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/check-mcp-server.sh\" remotion-media KIE_API_KEY", | ||||||
| "timeout": 5 | ||||||
| } | ||||||
| ] | ||||||
| }, | ||||||
| { | ||||||
| "matcher": "replicate_run|replicate_create_prediction", | ||||||
| "type": "command", | ||||||
| "command": "sh scripts/check-mcp-server.sh replicate REPLICATE_API_TOKEN", | ||||||
| "timeout": 5000 | ||||||
| "hooks": [ | ||||||
| { | ||||||
| "type": "command", | ||||||
| "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/check-mcp-server.sh\" replicate REPLICATE_API_TOKEN", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 P3 (minor) — Running the hook with POSIX 'sh' ignores the script's bash shebang ('#!/bin/bash'). If bash-specific syntax is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.
Suggested change
|
||||||
| "timeout": 5 | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ], | ||||||
| "PostToolUse": [ | ||||||
| { | ||||||
| "matcher": "searchPhotos|searchVideos|downloadVideo", | ||||||
| "type": "command", | ||||||
| "command": "sh scripts/post-tool-note.sh pexels-attribution", | ||||||
| "timeout": 3000 | ||||||
| "hooks": [ | ||||||
| { | ||||||
| "type": "command", | ||||||
| "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-note.sh\" pexels-attribution", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 P3 (minor) — Running the hook with POSIX 'sh' ignores the script's bash shebang ('#!/bin/bash'). If bash-specific syntax is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.
Suggested change
|
||||||
| "timeout": 3 | ||||||
| } | ||||||
| ] | ||||||
| }, | ||||||
| { | ||||||
| "matcher": "render", | ||||||
| "type": "command", | ||||||
| "command": "sh scripts/post-tool-note.sh captions-tip", | ||||||
| "timeout": 3000 | ||||||
| "hooks": [ | ||||||
| { | ||||||
| "type": "command", | ||||||
| "command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-note.sh\" captions-tip", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 P3 (minor) — Running the hook with POSIX 'sh' ignores the script's bash shebang ('#!/bin/bash'). If bash-specific syntax is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.
Suggested change
|
||||||
| "timeout": 3 | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 P3 (minor) — Running the hook with POSIX 'sh' ignores the script's bash shebang ('#!/bin/bash'). If bash-specific syntax (such as pipefail or arrays) is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.