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 karlkfiv1.17.0MITIn 1 marketplace
Asks before a shell or file command reaches outside your project root, so in-repo greps run silently. It runs as a PreToolUse hook on every Bash, PowerShell and file tool call and needs Python 3 on your PATH.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
3 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
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.
Workspace-boundary shell permissions for Claude Code.

Stop approving every in-repo grep. Start catching the one that reads
/etc/passwd.
You ask Claude to "find that auth error."
It runs grep -r token /var/log.
Or cat ~/.aws/credentials while "checking the environment."
Or pipes a file from outside your repo into jq.
The default Bash(grep:*) permission rules can't tell these apart from the dozens of in-repo greps Claude runs every session — they either trust every invocation or prompt on every one.
workspace-guard is a PreToolUse hook for the shell tools (Bash and PowerShell) — and for Claude's native file tools (Read, Grep, Glob, Edit, Write, …) — that parses the command, finds its file arguments, and asks for confirmation only when a path resolves outside your project root ($CLAUDE_PROJECT_DIR).
In-repo reads and pure pipelines run silently.
A path is the main way out of that boundary but not the only one, so the same rule covers pkill and Stop-Process, which reach another checkout's processes by pattern instead.

The hook produces one of four outcomes:
/tmp, /var/tmp, $TMPDIR, %TMP%): they're shared across every session and worktree and live outside the project root, so instead of prompting, the hook steers you to a repo-local gitignored scratch dir (./tmp/). It's also the default for writes into a sibling checkout of the same repo when the session runs in a git worktree, and for a process kill that names no path in this workspace — whether the pattern is the kill's own (pkill -f) or reached it through a pgrep or a ps pipeline (all below). Configurable down to ask; see Configuration. It is also the default for an argument the hook could not read — a $VAR/$(…)/`…`/~user token, or a relative path after a cd it couldn't follow.
That is the hook failing to parse rather than a boundary question, so the reason carries the literal-path rewrite and the agent applies it without anyone being prompted (see Unreadable arguments deny).
Both blocking reasons — ask and deny — open with workspace-guard: , so either one names the hook that produced it.
Claude Code names the plugin in neither the prompt nor the text handed back from a refusal, so without the opener there is nothing to tell you which of your installed hooks stopped the command.
allow reasons stay bare: they reach neither a prompt nor the agent.auto, acceptEdits and bypassPermissions they pre-approve, so a defer runs — which is why a silence the hook chose because it could not read the command escalates in those three instead (see Suppression escalation).7-day copy clicks
Plugins from other owners that cover similar ground
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 workspace-guard