
Saferun Guard
- 4 repo stars
- Updated July 2, 2026
- Cocabadger/saferun-guard
saferun-guard is a Claude Code plugin marketplace that installs a runtime safety firewall intercepting Bash and file-write tool calls against 112 rules and 9 secret patterns for developers using autonomous coding agents.
About
The saferun-guard marketplace publishes a Claude Code plugin that acts as a runtime safety firewall for AI coding agents. PreToolUse hooks on Bash and Write/Edit run bash and jq scripts that classify each command through REDIRECT, BLOCK, ASK, or ALLOW tiers in about 20ms, splitting compound chains on &&, ||, and semicolons. It ships 112 safety rules plus 9 secret content patterns covering force pushes, rm -rf, kubectl deletes, lockfile overwrites, and .env writes. PostToolUse audit logging writes JSONL to ~/.saferun/audit.jsonl. Install with claude plugin marketplace add Cocabadger/saferun-guard and plugin install saferun-guard@saferun-guard. Reach for it when letting agents run shell commands against production repos, shared infra configs, or credential-adjacent files. Fail-open design passes commands through if classification scripts error.
- PreToolUse hooks classify Bash via 112 rules into REDIRECT, BLOCK, ASK, ALLOW tiers
- Splits compound commands on &&, ||, ; and checks each segment independently
- Scans Write/Edit content for 9 secret patterns including AWS and GitHub tokens
- Blocks .env, .ssh, lockfile, and /etc/ path writes with 25 file BLOCK rules
- Logs agent actions to ~/.saferun/audit.jsonl with /saferun-guard:status commands
Saferun Guard by the numbers
- Data as of Jul 10, 2026 (Skillselion catalog sync)
/plugin marketplace add Cocabadger/saferun-guardAdd your badge
Show developers this marketplace is listed on Skillselion. Paste this into your README.
| repo stars | ★ 4 |
|---|---|
| Last updated | July 2, 2026 |
| Repository | Cocabadger/saferun-guard ↗ |
How do you block dangerous agent shell commands automatically?
Block git push --force, rm -rf, and .env writes via Claude Code PreToolUse hooks with audit JSONL
Who is it for?
Development teams running Claude Code agents with shell and filesystem access who need automatic blocking of destructive commands and secret leaks.
Skip if: Developers seeking SAST code analysis or post-incident forensics—saferun-guard intercepts live tool calls, not static codebase scans.
What you get
PreToolUse hook decisions (allow, ask, block, redirect) with audit stats via /saferun-guard:status and prevented credential writes.
- Installed safety hooks
- Runtime allow/ask/block decisions
- Audit status via slash command
By the numbers
- 112 safety rules plus 9 secret patterns checked in ~20ms per tool call
- 27 blocked command rules, 25 ask-user command rules, 3 redirect rules
Plugins in this marketplace
1 plugin - install individually after you add the marketplace.
Recommended Marketplaces
How it compares
Pick saferun-guard for live PreToolUse interception during agent sessions; pair with SAST or review skills for static pre-merge analysis.
FAQ
How does Saferun Guard intercept agent actions?
Saferun Guard registers Claude Code PreToolUse hooks: classify-command.sh on Bash tool calls and classify-file.sh on Write|Edit, evaluating each request against 112 rules and 9 secret content patterns in about 20ms.
What happens when Saferun Guard detects a dangerous command?
Saferun Guard returns BLOCK (agent sees rejection), ASK (user must approve), REDIRECT (suggests a safer command for 3 rules), or ALLOW (silent pass). Roughly 95% of normal actions pass without prompts.