ClaudeCodeMod

All shelves / Mods / Safety

guardrails

By arasovic

guardrails is a Claude Code safety mod by arasovic.

Holds Cloudflare write commands, attribution lines in commits and pull requests, and branch names that start with claude/.

Holds a command

Install

The marketplace name is claude-code-mods.

In your shell
claude plugin marketplace add arasovic/claude-code-mods
claude plugin install guardrails@claude-code-mods
Open the repo

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.4.0
License
MIT
Repo stars
7
Last change
2026-10-10

What it can reach

  • Holds a command

Tested on Claude Code 2.1.296. Restart after installing. The marketplace name is claude-code-mods, the same string hamzafer uses. Add arasovic/claude-code-mods. Every rule starts off, so it blocks nothing until you turn a rule on in /config, or under pluginConfigs in ~/.claude/settings.json. cfWrites blocks cf deploy, cf migrate, and cf init, and Claude is told to ask you to run them. attribution blocks git commit, gh pr, and gh issue with a Co-Authored-By or Generated with Claude line, and Claude is told to remove the line and retry. claudeBranches blocks git checkout -b, git switch -c, git branch, and git push naming a claude/ branch, and Claude is told to use a purpose prefix such as fix/ or chore/.

The marketplace, arasovic's claude-code-mods, also holds secret-guard, loop-guard, pin-board, and other mods by the same author. This one installs on its own; to update, run claude plugin marketplace update claude-code-mods, then claude plugin update guardrails@claude-code-mods. Blocking the commands you never want run is why this page files it under safety. bash-guard, by Singh-AP, holds every Bash call, including under --dangerously-skip-permissions, blocks rm -rf on a home or system directory, and asks before a force-push, a hard reset, or a pipe into sh. subagent-fence-erikdarlingdata refuses a force-push, a push to a protected branch, a git command that skips hooks, and killing a process by name. This one holds three narrow rules, each off until you pick it. The author says it reads the command text only, so git commit -F file, shell aliases, and scripts get through, and points to permission deny rules for a hard guarantee and for rules of your own. To stop the attribution line at its source, the README points to Claude Code's own attribution setting, set to false in settings.json. Reading credential files is left to secret-guard. Singh-AP's awesome-claude-mods marketplace serves a different guardrails, by mishgoldenberg, as guardrails@awesome-claude-mods. Its plugin.json names Mehmet Aras as its author.

Demo

The guardrails card on the author's GitHub page
Screenshot of the author's GitHub page.

What it hooks into

  • tool.callAround a tool call, where it can hold oneBash

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
arasovic
Category
Safety
Marketplace
claude-code-mods
Repo
arasovic/claude-code-mods
Folder
guardrails
Version
0.4.0
License
MIT
Repo stars
7
Last change
2026-10-10
Language
TypeScript
Files
6

Other mods in Safety

guardrails-liteedtrackaiHolds a commandHolds a read of a secret .env file, a git force-push, and a recursive rm on /, ~, or $HOME. .env.example, .env.sample, and .env.template are allowed.injection-guardSingh-APStrips hidden characters from tool output and marks results that carry instructions aimed at Claude, so they reach it as untrusted data.collision-guardnateherkaiHolds a commandHolds an edit to a file another open chat changed in the last 30 minutes, and asks you to proceed, move this chat to a worktree, or cancel.recording-modenateherkaiHolds a commandMasks keys, personal details, and business figures on screen while you record, hides results from mail, chat, and finance tools, and keeps private files closed.secret-boxray-amjadHolds a commandOpens a masked box when Claude needs a key, writes the key to .env, and gives Claude a placeholder; any key a tool prints comes back as a placeholder too.secret-shieldSingh-APHolds a commandReplaces API keys, tokens, private keys, and passwords in tool output with a redaction marker before the model or the transcript sees them.transcript-redactorray-amjadSwaps secrets and email addresses in the session for stable placeholders, and puts the real value back on the way into Bash, Write, and Edit.safe-deletecharlie947Holds a commandMoves the files Claude deletes to the Bin instead, toasts a receipt, and /undo-delete puts the last batch back.loop-detectiveYeonwooSungOpens a case when the same Bash command fails the same way again, ties it to the edits that followed, and shows the live cases in a pane and a status line.display-redactionmelodic-softwareMasks email addresses and secret-shaped text in what Claude Code draws, and leaves the transcript, the model's context, and the files unchanged.jev-permission-gatemadisonrickertHolds a commandHolds routine tool calls in auto mode for Jev to allow or deny, and sends the uncertain ones on to Claude Code's built-in classifier.subagent-wallerikdarlingdataHolds a commandHolds a subagent after a time limit to git, gh, and Markdown or text writes, and nudges a code-changing subagent that has edited nothing.
All 73 in Safety