guardrails is a Claude Code safety mod by mishgoldenberg.
Blocks commands such as rm -rf, mass kubectl deletes, or a force push from clickable rules with presets, and checks scripts Claude wrote before they run.
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
Version
0.2.0
License
MIT
Repo stars
11
Last change
2026-10-06
What it can reach
Draws in the session
Holds a command
Sees tool calls
Needs Claude Code 2.1.286 or newer. Restart Claude Code after installing. The README's main install adds mod-manager and picks mods from its /mods pane; this line is from its loop that installs every mod without the manager. Panels dock beside the chat in the desktop app or a terminal 144 columns wide or more, and open inline in narrower ones. Options appear in /config. Function hooks are early access, and a Claude Code update can break a mod. Safe defaults turns on the first time it loads, and /guard-preset off turns everything off. The presets are Safe defaults, Locked to project, and Read-only review. /guard opens the rules panel, where you can add your own patterns, and /guard-log shows what it blocked in the last 7 days. Every block is kept for 30 days on this machine, with commands cut to 200 characters. Claude cannot edit guardrails' own settings. The author calls it a seatbelt, not a sandbox: a script that arrives another way, an obfuscated command, or a shell trick that rewrites its settings can get through. Quoted prose such as a commit message is ignored unless it is handed to a shell.
The marketplace name is claude-mods. The marketplace also holds mod-manager, which installs the others from a pane, and ten more mods. This one installs on its own. The README's loop installs every mod with claude plugin install "$m@claude-mods"; this page puts this mod's name in place of $m. Refusing destructive commands is why this page files it under safety. bash-guard holds every Bash call and blocks rm -rf on a home or system directory. blast-radius holds a risky shell command and shows what it would touch before it asks. This one is a panel of rules you click on or off, including keeping Claude inside the project, and it reads a script Claude wrote this session before a shell command runs it. A blocked call gets a denial that tells Claude not to work around the rule.
Demo
From the author's repo.
What it hooks into
session.startWhen a session starts
command.runWhen you run its slash command/guard/guard-preset/guard-log
tool.callAround a tool call, where it can hold one
ui.renderDraws into the sessionPane
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 3
/guardOpen guardrails: toggle safety rules and presets
/guard-presetApply a guardrail preset
/guard-logWhat guardrails blocked in the last 7 days
Files
The author's source, 3 files. They load when you open them.