claude-code-safety-gate
v1.0.1
Published
npx installer for the Claude Code safety-gate plugin: approval-gated hooks that pair with autonomous loop plugins like ralph-wiggum.
Maintainers
Readme
Claude Code Safety Gate
An approval-gated safety plugin for Claude Code. It blocks destructive shell commands outright and requires explicit human approval for commit, push, PR creation, publishing, and outbound webhook/notification calls.
This plugin is designed to run alongside Anthropic's official ralph-wiggum plugin (or any autonomous loop), so you get:
ralph-wiggum-> bounded iterative bugfix/dev loop with--max-iterationsand a completion promisesafety-gate(this plugin) -> hard stops and approval prompts on risky actions during that loop
Quick install
npx claude-code-safety-gateThis copies the plugin into:
.claude-plugins/claude-code-safety-gateand creates .safety-gate.env if one does not exist.
Recommended companion install
/plugin marketplace add anthropics/claude-code
/plugin install ralph-wiggum@claude-code-pluginsWhat it blocks outright (deny)
rm -rf /orrm -rf *style destructive deletes- fork bombs
mkfs.*, rawddwrites to/dev/*chmod -R 777 /- piping curl/wget directly into
sh
What it asks approval for
git commitgit pushgh pr create/hub pull-requestnpm publish,twine upload,docker push- outbound requests to Slack/Discord/Teams/webhook endpoints
All decisions are logged to .claude/safety-gate/audit.log.
Configuration
Edit .safety-gate.env:
EXTRA_DENY_PATTERNS=""
EXTRA_ASK_PATTERNS=""
ALLOW_AUTO_COMMIT=false
ALLOW_AUTO_PUSH=false
ALLOW_AUTO_PR=falseCheck status
Inside Claude Code:
/safety-statusSee INSTALL.md for full setup and publishing instructions.
