Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Copy link
Copy Markdown

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.

Suggested change
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/check-mcp-server.sh\" remotion-media KIE_API_KEY",
"command": "bash \"${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",

Copy link
Copy Markdown

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 is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.

Suggested change
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/check-mcp-server.sh\" replicate REPLICATE_API_TOKEN",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/check-mcp-server.sh\" replicate REPLICATE_API_TOKEN",

"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",

Copy link
Copy Markdown

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 is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.

Suggested change
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-note.sh\" pexels-attribution",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-note.sh\" pexels-attribution",

"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",

Copy link
Copy Markdown

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 is introduced in the script, execution under 'sh' can fail. Running it with 'bash' avoids potential shell compatibility issues.

Suggested change
"command": "sh \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-note.sh\" captions-tip",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-note.sh\" captions-tip",

"timeout": 3
}
]
}
]
}
Expand Down