reduce-workspace-guard-prompts

reduce-workspace-guard-prompts is a skill for Claude Code from karlkfi/claude-bouncer. It costs 69 tokens per session (1,670 once invoked), scanned A, original, MIT.

A guide and diagnostic tool for workspace-guard, a shell hook that asks for permission before commands access files outside the project folder.

In plain words
What is it for?
Investigating prompt history and reducing avoidable prompts from commands such as grep, cat, sed, or file-copy operations.
Why use it?
It explains why repeated permission prompts happen and helps identify the paths and commands causing them.

Skill for Claude Code

Written for Claude Code: $CLAUDE_PROJECT_DIR variable. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the workspace-guard plugin — 1 skill shipped together

Good fit Investigating prompt history and reducing avoidable prompts from commands such as grep, cat, sed, or file-copy operations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add karlkfi/claude-bouncer
Claude Code
/plugin install workspace-guard

Made for: Claude Code.

Or install workspace-guard, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reduce-workspace-guard-prompts

README.md
[![agentmods](https://agentmods.dev/badge/skills/karlkfi/claude-bouncer/reduce-workspace-guard-prompts/github.svg)](https://agentmods.dev/skills/karlkfi/claude-bouncer/reduce-workspace-guard-prompts)
Your own site
<a href="https://agentmods.dev/skills/karlkfi/claude-bouncer/reduce-workspace-guard-prompts"><img src="https://agentmods.dev/badge/skills/karlkfi/claude-bouncer/reduce-workspace-guard-prompts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for reduce-workspace-guard-prompts

Your own site · 80×15
<a href="https://agentmods.dev/skills/karlkfi/claude-bouncer/reduce-workspace-guard-prompts"><img src="https://agentmods.dev/badge/skills/karlkfi/claude-bouncer/reduce-workspace-guard-prompts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,670 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01670
Opus 5 $0.00034 $0.00835
Sonnet 5 $0.00014 $0.00334
Haiku 4.5 $0.00007 $0.00167

Measured 7d ago against content hash ece1d40be3d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

reduce-workspace-guard-prompts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/workspace-guard/skills/reduce-workspace-guard-prompts/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reducing workspace-guard prompts

workspace-guard is a PreToolUse hook that prompts before a guarded bash file command (grep, sed, awk, jq, cat, head, tail, cp, mv, rm, tee, dd, and friends) reads or writes a path outside the project root ($CLAUDE_PROJECT_DIR). In-root reads and pure pipelines run silently. So a flood of prompts means commands keep resolving paths outside the root — usually for one of the avoidable reasons below, not because the work genuinely needs outside files.

Diagnose

Don't guess about past friction — measure it. The plugin ships an analyzer, scripts/friction-report.py, that re-reads the hook decisions Claude Code already recorded in the local session transcripts and ranks them by category, offending path, and triggering command. Run it first so the diagnosis is grounded in the user's real prompt history:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/friction-report.py" --repo "$(basename "$CLAUDE_PROJECT_DIR")"

This reports the friction ratio (ask+deny share), a By category breakdown, the top offending paths, and the top triggering commands for the current project over the last 7 days. The ratio's denominator counts only decisions the hook emitted — a silent defer on an unguarded command leaves no record — so it is a share of the hook's own decisions, not of every Bash call. Useful adjustments:

  • --since 24h / --since 2026-06-01 / --since all — widen or narrow the window (default 7d).
  • --repo '' — drop the project filter to see friction across every repo.
  • --raw — show exact path tokens instead of collapsing per-session temp paths.
  • --json — machine-readable, if you'd rather parse it than read the table.

Fall back gracefully. If the script can't be found ($CLAUDE_PLUGIN_ROOT unset — try the in-repo path scripts/friction-report.py), exits with "No transcripts …", or prints "No guard decisions found" (a fresh setup with no recorded prompts yet), skip the data step and diagnose from the most recent prompts in this session instead — the hook's reason text names the offending path and the fix for each.

Read the full file on GitHub · 132 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed ece1d40be3d4
  2. 12d ago First seen · 132 lines · 69 tokens per session scan A 39269ce11770

Subscribe to this mod's changes

reduce-workspace-guard-prompts is a skill published in the GitHub repository karlkfi/claude-bouncer (3 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 1,670 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

debugging-strategies

Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.

wshobson/agents · 43 tokens

git-advanced-workflows

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

wshobson/agents · 54 tokens

sql-optimization-patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

wshobson/agents · 44 tokens

parallel-debugging

Debug complex issues using competing hypotheses with parallel investigation, evidence collection, and root cause arbitration. Use this skill when debugging bugs with multiple potential causes, performing root cause analysis, or organizing parallel investigation workflows.

wshobson/agents · 44 tokens

error-handling-patterns

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

wshobson/agents · 43 tokens

spark-optimization

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

wshobson/agents · 37 tokens