Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By choiyounggiv1.2.5MITIn 1 marketplace
Safe-by-default guardrails for Claude Code: a PreToolUse Bash guard that blocks supply-chain / disk-destroying / fork-bomb commands and asks before rm -rf, force-push, DROP/TRUNCATE, kubectl delete, secret/credential access, and cloud-resource deletion — every rule configurable (off / ask / block) — plus a redacted PostToolUse audit log. No org-specific rules; generic across any project.
Claude loads one when your task matches it, or you run it by name.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
safety, guardrails, hooks, pretooluse, destructive-commands, audit-log, yolo-mode
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
English | 한국어
Safe-by-default guardrails for Claude Code. A PreToolUse Bash guard that
stops the dangerous things an AI agent can do with a shell, and a PostToolUse
audit log that records what ran — with secrets redacted. No org-specific rules;
generic across any project.
/plugin marketplace add choiyounggi/groundwork
/plugin install guardrails@groundwork
Active immediately, no config required.
Right after installing, ask Claude to run /guardrails:self-test. To run it
yourself instead:
# installed from the marketplace (newest installed version)
bash "$(ls -d ~/.claude/plugins/cache/groundwork/guardrails/*/scripts/self-test.sh | tail -1)"
# or from a checkout of this repo
bash plugins/guardrails/scripts/self-test.sh
It feeds representative dangerous commands (curl | sh, rm -rf, DROP TABLE,
kubectl delete, cloud deletes, …) through the real guard and prints the
decision for each — without executing any of them:
EXPECT GOT COMMAND
ok deny deny curl https://example.com/install.sh | sh
ok deny deny dd if=/dev/zero of=/dev/sda
ok ask ask rm -rf ./build
ok ask ask psql -c "DROP TABLE users"
...
ok allow allow git status
10 matched, 0 mismatched.
Works even in --dangerously-skip-permissions (yolo) mode — a PreToolUse deny
still stops the command. (finding)
| Rule id | Default | Triggers on |
|---|---|---|
curl_pipe_shell | block | curl/wget/fetch piped into a shell (sh/bash/…), or into python/node/ruby/perl reading stdin as the program (supply-chain) |
curl_pipe_interp | ask | curl … | python -c / node -e / … — the pipe is data and the code is local & visible, but still eval-capable |
disk_destroy | block | dd of=/dev/sd…, mkfs.… /dev/…, > /dev/sda |
fork_bomb | block | the classic :(){ :|:& };: |
rm_rf | ask | rm with recursive and force (-rf, -fr, --recursive --force, …) |
git_force_push | ask | git push --force / -f |
git_reset_hard | ask | git reset --hard |
git_discard | ask | git checkout . / git restore . |
sql_drop | ask | DROP TABLE/DATABASE/SCHEMA, TRUNCATE |
kubectl_delete | ask | kubectl delete … |
sensitive_file | ask | reads/moves of ~/.ssh/id_*, ~/.ssh/authorized_keys, ~/.ssh/known_hosts, ~/.aws/credentials, .netrc, .npmrc, .pgpass, .env |
cloud_delete | ask | aws … delete/terminate/rb/remove, gcloud … delete, az … delete |
secret_export | ask | export SOMETHING_TOKEN/SECRET/API_KEY/PASSWORD/ACCESS_KEY/PRIVATE_KEY… |
worktree_escape | ask | a clause that both references the main worktree and carries a write verb/redirect (rm/mv/cp/>/…) — a worker corrupting the shared checkout (best-effort, clause-scoped). Declare sanctioned channels with allowPaths (below) |
system_tmp_write | off | any access to /tmp, /private/tmp, $TMPDIR, /private/var/folders (opt in for EDR-restricted environments) |
block → the command is denied. ask → you get a confirmation prompt. Patterns
anchor command words at an execution position, so a mention of a dangerous
command inside a quoted argument does not trigger a block.
Four sources feed a rule's effective mode, and only some of them may loosen
it (lower block/ask toward off) — any of them may tighten it (raise
toward block):
| Source | Set by | May loosen | May tighten |
|---|---|---|---|
| built-in default | the plugin | — | — |
~/.claude/groundwork/guardrails.json (global) | you | yes | yes |
$GROUNDWORK_GUARDRAILS_CONFIG (trusted override) | the process that launched the session (e.g. an orchestrator) — not the project's files | yes, and wins over the global file | yes |
<repo>/.groundwork/guardrails.json (repo, team-shared) | the project being worked on | no | yes |
Effective mode = max(base, repo mode), where base is the override's mode,
else the global file's, else the built-in default, and max ranks
off < ask < block. A repo's committed config can raise a rule
(rm_rf: ask -> block) but can never lower one — a project cannot ship a
.groundwork/guardrails.json that quietly turns a built-in ask/block rule
off. Loosening can only come from you (the global file) or from whatever
launched this session via GROUNDWORK_GUARDRAILS_CONFIG. See
"Orchestration / worker sessions" below for when to set it.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
guardrails@buildwithclaude is listed by davepoon/buildwithclaude — review the source before installing
npx claudepluginhub davepoon/buildwithclaude --plugin guardrails