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 melodic-software Verified Orgv6.3.0MITIn 1 marketplace
Blocks risky agent actions before they run, like force-pushes, hard resets and secret commits. Every guard has its own kill switch. Needs shfmt 3.14.1+ and jq; without jq it denies every Bash call.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Guards that deny the call when they crashdeny_on_crash
Comma-separated guard names (e.g. block-dangerous-git) whose crash denies the tool call instead of allowing it with the guard-did-not-run notice. Empty, the default, lets every crashed guard allow with the notice. An unknown name is reported and ignored. Team-file layer: README Option details.
stringdefault
Hook stdin read timeout (seconds)stdin_read_timeout
Idle bound on reading the hook payload from stdin: how long a silent pipe is tolerated before a blocking guard fails closed. Default 2. Only a JSON payload the pipe closed on mid-document is allowed with a notice; a stalled pipe stays a block.
numbermin 1default 2
Merge guardmerge_guard_enabled
Blocks a PR merge, auto-merge or merge-queue request while the PR has a hold label, an unresolved review thread, a changes-requested review, a failed check, a pending check (immediate merge only) or no pr-verify PASS where one is due. Fails open, visibly, on an unreadable PR. On by default.
booleandefault true
Block-cd-prefix guardblock_cd_prefix_enabled
Denies a Bash command that opens with cd <path> followed by &&, ; or a newline and then runs git or writes to a relative path, with the reason to use git -C <abs path>. cd . and a cd to the current directory pass. Also states this rule to each subagent at its start. On by default.
booleandefault true
Block-no-verify guardblock_no_verify_enabled
Blocks git hook-bypass attempts: --no-verify, core.hooksPath=, and hook-manager env-var disables for a configurable set (lefthook, husky, pre-commit and simple-git-hooks by default). On by default.
booleandefault true
Block-pr-poller guardblock_pr_poller_enabled
Denies a Monitor or background Bash loop that sleeps and polls a pull request, and a gh event listen on a pull request without the monitor's full event set, pointing at /source-control:pull-request monitor or that event set. The monitor skill's monitor-poll.sh passes. On by default.
booleandefault true
Git-hooks noticegit_hooks_notice_enabled
At session start, names /guardrails:setup apply install-git-hooks once when this clone lacks a guardrails git-hook entry or holds a drifted one; a declined entry stays quiet. Turning it off also silences the session-start notice that jq is missing. On by default.
booleandefault true
Block-dangerous-git allow-listblock_dangerous_git_allow
Comma-separated forms block-dangerous-git permits: push-force, push-lease-unsafe, push-delete, reset-hard, clean-force, checkout-dot, restore-dot, checkout-force, plus the PowerShell ps-unparsable-* sink tokens the README's Option details list. Empty, the default, blocks all.
stringdefault
Block-cross-domain guardblock_cross_domain_enabled
Denies a Bash or PowerShell global git identity write (git config --global user.email and kin, a ~/.gitconfig write). In an identity domain (identity-domains.json) also denies naming another domain's path, using its marker, or gh/az without the domain's config dir. On by default.
booleandefault true
Merge guard ignored checksmerge_guard_ignored_checks
Comma-separated <app slug>:<check name> pairs the merge guard never judges as pending or failing, the only way a failed check is cleared. The default names the pr-merge lane's merge job, which runs as the merger, not a gate, by display name and by job id. Empty judges every check.
stringdefault github-actions:Merge,github-actions:mer…
Settings-write-ask hooksettings_write_ask_enabled
Runs the PreToolUse hook that asks before Write, Edit, and NotebookEdit calls aimed at a Claude Code settings file. On by default. Shell writes and files rendered into place are outside its matcher.
booleandefault true
Block-credential-read allow-listblock_credential_read_allow
Comma-separated families block-credential-read permits: credential-fill, gh-auth-token, env-echo, credential-file-read. Empty, the default, blocks all.
stringdefault
Block-dangerous-git guardblock_dangerous_git_enabled
Blocks irreversible git operations: push --force, reset --hard, clean -f, worktree-wide checkout or restore discards, and a push --force-with-lease that leases against a value git resolves at push time. On by default. The README's Option details define the lease case.
booleandefault true
Connected-page guardconnected_page_guard_enabled
Runs the PreToolUse hook that denies an Artifact publish of an HTML page whose content security policy names a loopback connect-src. On by default. Turn off to allow publishing such a page.
booleandefault true
Hardcoded-path-check guardhardcoded_path_check_enabled
Blocks writes containing hardcoded machine-specific paths. On by default.
booleandefault true
Block-convention-violation guardblock_convention_gate_enabled
Blocks a commit subject or gh pr create --title off the team-tracked pattern in docs/conventions/source-control.yaml, else docs/conventions/source-control/commit-convention.yml. On by default; with no tracked or personal pattern nothing is enforced. Same exemptions as block-noncanonical-commit.
booleandefault true
Block-credential-read guardblock_credential_read_enabled
Blocks a command whose output is a credential: git credential fill, gh auth token, a token-shaped variable echoed, and an interpreter (python -c, node -e) reading .env, .netrc, ~/.ssh/id_* or ~/.aws/credentials. cat is left to Read() deny rules. Off by default: precision below the bar.
booleandefault false
Block-foreground-wait guardblock_foreground_wait_enabled
Denies a foreground Bash command that waits with an until loop or a --watch flag, with the reason to set run_in_background or use the Monitor tool. A call with run_in_background set to true passes. On by default.
booleandefault true
Block-fix-request-post guardblock_fix_request_post_enabled
Blocks an agent from posting the PR-fix lane fix request (a line starting "PR-fix lane: please fix this finding") to GitHub through gh, curl or a GitHub MCP write tool. Only the owner posts it, in the GitHub UI. On by default.
booleandefault true
Lanes app loginblock_lane_pr_disable_auto_app
The GitHub App login (slug, app/<slug> or <slug>[bot]) whose pull requests block-lane-pr-disable-auto protects. Empty, the default, blocks a disable on any pull request a GitHub App opened, since the guard cannot tell which App is the lanes App; a pull request a person opened passes.
stringdefault
Warn-plugin-cache-walk guardwarn_plugin_cache_walk_enabled
Warns, never blocks, when a Bash or PowerShell grep -r, rg, find or du walks the whole plugin cache (the plugins directory, its cache, or a marketplace or plugin directory in it) instead of one installed version, pointing at Grep or Glob rooted there. On by default.
booleandefault true
Block-noncanonical-commit allow-listblock_noncanonical_commit_allow
Comma-separated form tokens block-noncanonical-commit permits. The only token today is message-flag, which permits a -m message the shell would expand. Empty, the default, permits none.
stringdefault
Block-Windows-drive-tmp guardblock_windows_drive_tmp_enabled
Blocks writes to a Windows drive-root temp path (/tmp, C:\tmp, \tmp, /c/tmp) that resolves to <drive>:\tmp instead of %TEMP%, in shell commands and Write/Edit file paths alike. On by default. The Git for Windows exception is in the README's Option details.
booleandefault true
Block-main-checkout-edit guardblock_main_checkout_edit_enabled
Denies a Write, Edit or NotebookEdit to a file that is not git-ignored in a repository's main checkout while it is on the remote default branch (origin/HEAD), with the steps to make the edit in a worktree. Linked worktrees, other branches and a detached HEAD pass. Off by default; true turns it on.
booleandefault false
Block-root-delete-target guardblock_root_delete_target_enabled
Blocks a recursive delete (rm, Remove-Item, rd /s) of a filesystem, home, drive or UNC root, an empty or bare-variable operand, a protected tree (.git, repo or worktree root, ~/.claude, other sessions' scratchpads), or a path outside the repo, temp, the scratchpad and allowed roots. On by default.
booleandefault true
Secret-pattern-detection guardsecret_pattern_detection_enabled
Blocks writes containing high-confidence secret or credential patterns. On by default.
booleandefault true
Block-github-post-content guardblock_github_post_content_enabled
Blocks a Bash or PowerShell gh or curl command whose GitHub post body holds a secret or a hardcoded machine path, using the secret-pattern-detection and hardcoded-path-check patterns; their options also turn off their half here. On by default.
booleandefault true
Block-noncanonical-commit guardblock_noncanonical_commit_enabled
Blocks git commit -m when the message holds a $ or a backtick the shell would expand (single-quote it, or pipe it via -F -); a plain message passes, multi-line included. On by default. Exempt: --amend, -C/-c, --fixup/--squash, -F <path>, and an in-progress merge or rebase.
booleandefault true
Workflow-resilience-check guardworkflow_resilience_check_enabled
Advises on Workflow fan-out with no wave cap of its own; never blocks. Off by default: a behavioral-class prose injector, held off by the instruction-economy evidence gate. Set true to turn it on.
booleandefault false
Unpinned force-with-lease pushblock_dangerous_git_unpinned_lease
allow or block. allow, the default, lets block-dangerous-git pass a lease with no full commit id: --force-with-lease plus --force-if-includes, or an empty expect. block allows only --force-with-lease=<ref>:<full-sha>. Any other value acts as allow. Team-file layer: README Option details.
stringdefault allow
Block-lane-PR-disable-auto guardblock_lane_pr_disable_auto_enabled
Blocks gh pr merge --disable-auto, or the disablePullRequestAutoMerge mutation through gh api graphql, on a pull request the lanes App opened, and says to hold it with the do-not-merge label instead. A target it cannot read is blocked. On by default.
booleandefault true
Block-body-format-violation guardblock_body_format_violation_enabled
Blocks gh pr create, gh pr edit with a body, gh issue create, or a GitHub MCP pull request write or issue create whose body breaks the format the target repository declares in docs/conventions/source-control.yaml; a repository that declares none is not judged. On by default.
booleandefault true
Flag-commit-PR-skill-bypass guardflag_commit_pr_skill_bypass_enabled
Advises when a direct gh pr create bypasses the source-control pull-request skill; never blocks. Off by default: a behavioral-class prose injector, held off by the instruction-economy evidence gate. Set true to turn it on.
booleandefault false
Block-exported-MSYS-pathconv guardblock_exported_msys_pathconv_enabled
Blocks a leaking MSYS path-conversion suppressor on Windows: an exported MSYS_NO_PATHCONV or MSYS2_ARG_CONV_EXCL, or one prefixed on a child shell (MSYS_NO_PATHCONV=1 bash -c ...). On by default. What it does not match is in the README's Option details.
booleandefault true
Block-foreground-wait script runnersblock_foreground_wait_script_runners
Comma-separated command words that pass the arguments after -- to the script they run, so block-foreground-wait still finds a --watch there (npm test -- --watch). Any other command stops the scan at --. Empty stops every scan at --.
stringdefault npm,pnpm,yarn,bun,npx
Block-no-verify hook-manager prefixesblock_no_verify_hook_manager_prefixes
Comma-separated hook-manager env-var name prefixes block-no-verify treats as a bypass when set to 0 or false (e.g. lefthook,husky). Empty, the default, uses the built-in set: lefthook, husky, pre_commit, simple_git_hooks.
stringdefault
Block-root-delete-target allowed rootsblock_root_delete_target_allowed_roots
Comma-separated absolute directories; a recursive delete passes when its real path is strictly under one. An entry like D:/worktrees/.tmp-* allows only direct children whose name extends that prefix. Empty by default; adds to the temp roots and scratchpad. Limits: README Option details.
stringdefault
Secret-pattern-detection allowed rootssecret_pattern_detection_allowed_roots
Comma-separated absolute directories; a Write, Edit or NotebookEdit whose real path is strictly under one is not scanned for secrets. Empty by default. A commit is still checked only in clones where /guardrails:setup apply install-git-hooks ran. Limits: README Option details.
stringdefault
Block-root-delete-target protected treesblock_root_delete_target_protected_trees
Comma-separated absolute directories a recursive delete never removes, even under the repo or an allowed root: the directory, anything under it, and a directory holding it are refused. Empty by default; adds to the built-in protected trees. Limits: README Option details.
stringdefault
Secret-pattern-detection skips gitignored filessecret_pattern_detection_skip_gitignored
When true, a Write, Edit or NotebookEdit to a file its own repository ignores is not scanned for secrets. Off by default. A commit is still checked only in clones where /guardrails:setup apply install-git-hooks ran. Limits: README Option details.
booleandefault false
A Claude Code plugin bundling 25 toggleable safety guards that catch risky agent actions the moment they happen, before a write lands or a bash command runs, and four git-hook checks that cover every commit and push. Each guard has its own kill switch, listed under Per-hook kill switches.
Since 0.31.0 the always-on guards are registered through one dispatcher per event,
hooks/run-guards.sh, which reads the payload once, extracts its fields with one jq
process, and sources each guard in turn inside that one bash process. Since 0.41.3
those rows are exec form: "command": "node" with hooks/exec-bash.mjs and the
dispatcher script in args. Each fire starts two processes: node, which finds bash
(the candidate order is in the launcher's contract; on Windows it is Git Bash,
never the WSL relay) and spawns it, then that bash, which sources every guard in one
process. workflow-resilience-check.sh is
the same exec form, with --require-true WORKFLOW_RESILIENCE_CHECK_ENABLED so the
default-off checker exits in node before bash starts. The table below
still names every guard, and every guard still ships as its own script with its own
contract test, kill switch, and telemetry envelope, deciding exactly as it did as a
standalone hook. hooks/hooks.json lists each guard by file name as an argument of the
dispatcher for its event, so the registration stays readable per guard. What the
dispatcher owns: the spawn shape (one bash process per Bash/PowerShell call where there
were eight, one per Write/Edit PreToolUse where there were three, each started by
the node entry), the exit code (2 if any guard blocks, and every
guard still runs so a command that trips two guards shows both reasons; that
is deliberate, not leftover work, so a dual-blocked PowerShell sink prints both
denials instead of hiding one (#4236)), and the merge
of several guards' additionalContext into the one JSON document a hook process may
emit. On the Bash/PowerShell row it also refuses (exit 2) a command holding more than
256 command or process substitutions ($(, <(, >(, a backtick pair) before any guard
runs, because the guards' combined cost grows with that count and a row cancelled at its
60-second timeout blocks nothing
(#4684).
On the Bash tool, text inside a single-quoted span does not count, whichever spelling it
holds, because bash substitutes nothing there. Nor does the body of a heredoc whose
delimiter is quoted (<<'EOF', <<"EOF", <<\EOF): bash expands nothing there, and
block-root-delete-target still reads such a body as commands, at about 1.1 ms per
spelling, unless the whole command is one cat, gh, git commit -F - or git tag -F -
line feeding it. For a body that gives it nothing to judge ($(: rm)) its 25-second
deadline never starts, so the 16384-character
command ceiling bounds the cost: 2.6 to 3.7 s measured. Unquoted, double-quoted and unquoted-heredoc-body substitutions still
count. A command that names a shell, eval, su, env, source,
. file or alias, or that has quoting the scan does not model, counts whole. PowerShell commands
count as text, quotes included.
It also tokenizes the event's command once and hands every guard that parses it
the same segments. One exception to "every guard still runs": on the Bash/PowerShell
row, a command longer than MAX_COMMAND_LEN (16384 characters, passed to the dispatcher
as --max-command-len) ends the chain at the first guard that blocks it. The five
guards that carry that ceiling refuse such a command unread, and the row now answers a
~70 KB command in about 64 ms instead of running past its 60-second timeout, where
Claude Code would let the call through unchecked (#4528). Each guard keeps its kill
switch; with one disabled, the next guard carrying the ceiling blocks.
The hook budget accounting carries the measurement.
workflow-resilience-check is not always-on and is registered on its own.
7-day copy clicks
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.
npx claudepluginhub melodic-software/claude-code-plugins --plugin guardrailsPlugins from other owners that cover similar ground