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 karlkfiv2.10.0MITIn 1 marketplace
Blocks mutating infrastructure commands aimed at production targets before Claude runs them, with a fix-it telling it which flag to add. Runs on every Bash call and needs Python 3 on your PATH.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A command runs shell commands (! syntax) when you invoke it
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.
Production-target guard rails for Claude Code Bash commands.

Let Claude mutate kind and dev clusters all day. Stop it at prod.
You ask Claude to "clean up the failed rollout."
It runs kubectl delete ns app-staging — against whatever context ~/.kube/config currently points at.
Or terraform destroy in a directory whose selected workspace is prod.
Or gcloud compute instances delete against the active gcloud project, which a parallel Claude session just repointed with gcloud config set project.
The default Bash(kubectl:*) permission rules can't tell these apart from the dozens of harmless dev-cluster commands Claude runs every session.
prod-guard is a PreToolUse hook for Bash that resolves where each infrastructure command will actually land — the explicit --context / --project / --profile flag if present, otherwise the tool's ambient config — classifies that target against configurable patterns, and:
kubectl config use-context, gcloud config set, …), each with a fix-it that tells the agent which flag to add;1.
Prod blast-radius. A mutating verb whose resolved target is a production environment.
Explicit targeting doesn't prevent this — kubectl --context prod delete ns x is perfectly explicit and perfectly catastrophic.
Only a guard that classifies the target can. prod-guard hard-blocks (deny) these, with a deliberate override for the rare intentional prod operation.
2.
Ambient-context clobbering. A mutating command that doesn't pin its target relies on shared mutable state: the kubeconfig current-context, the active gcloud configuration, the docker context, the default AWS profile.
When several Claude Code sessions run in parallel — increasingly the normal way to work — any of them can repoint that state between the moment a command is written and the moment it runs. prod-guard denies these with a self-healing fix-it (deny) that names the resolved target and the flag to add: the command can't run until the target is explicit, and the agent self-corrects in one round trip by adding --context/--project/… and retrying.
A deny beats an ask here because it's machine-actionable — it doesn't stall waiting on a human, and it makes the override available if pinning genuinely isn't possible.
The hook produces one of three outcomes per command (worst segment wins across &&/|/;/$( ) chains):
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 karlkfi/claude-bouncer --plugin prod-guardPlugins from other owners that cover similar ground