Home / Claude Code mods / Security / bash-guard

bash-guard

bash-guard is a Claude Code mod by hugo88 that blocks catastrophic Bash commands; holds risky ones (rm -r, git reset --hard, git clean, force push, migrations) and shows what they would change, with Proceed and Cancel.

Updated 2026-10-09

What is bash-guard?

bash-guard is a Claude Code mod by hugo88 that blocks catastrophic Bash commands; holds risky ones (rm -r, git reset --hard, git clean, force push, migrations) and shows what they would change, with Proceed and Cancel. It is listed under Security and has no public popularity data yet.

TypeClaude code mod
Authorhugo88
Repositoryhugo88/claude-code-bash-guard
Popularityno public popularity data yet
CategorySecurity
SecurityLow risk (88/100)
Rank#3,372 of 5,272 Claude Code mods; #370 in Security
LicenseApache-2.0
Last commit2026-10-09
Hooks2 events
SeesBash calls
Draws onPane, AbovePrompt

Is bash-guard safe to install?

bash-guard scores 88/100 on the MCPMods security check: Low risk. Things to review: starts processes outside the sandbox. It passed 7 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts processes outside the sandboxReview
Writes no files or configPass
Doesn't read environment variablesPass
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.now
$.process.runruns processes
$.session.cwd
$.ui.closedraws interface
$.ui.invalidatedraws interface
$.ui.opendraws interface
$.ui.resolvedraws interface
$.ui.toastdraws interface

How do I install bash-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/hugo88/claude-code-bash-guard
    claude plugin validate ./claude-code-bash-guard/.
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add hugo88/claude-code-bash-guard && claude plugin install bash-guard@claude-code-bash-guard

Or ask Claude to set it up

Paste this into Claude Code and it installs bash-guard for you:

Install the "bash-guard" Claude Code mod from https://github.com/hugo88/claude-code-bash-guard. Run claude plugin validate on it first and show me what it can access before you enable it.