Skip to main content

Module guard

Module guard 

Source
Expand description

gw guard — Claude Code hook helper that vets inbound Bash tool calls.

Input format: a JSON object with at least tool_name and tool_input. For Bash, tool_input.command is matched against a small risk pattern list. If the command is risky AND the cwd looks unhealthy (missing or not a directory), the helper exits non-zero with a stderr message, causing Claude Code to refuse the tool call.

Functions§

run