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 jeremygibersonv1.0.0In 1 marketplace
Intelligent tool use gating — auto-allows safe actions, escalates risky ones
Run automatically on Claude Code events. Claude doesn't decide.
1 critical · 2 cautions to review before installing
A hook runs before every tool call and can block or approve it
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.
A Claude Code plugin that brings sanity to tool use permissions. Instead of choosing between babysitting every action or granting node:*, this plugin auto-allows safe operations and only prompts you when something is genuinely risky.
Every tool call passes through three evaluation layers:
claude -p to evaluate against a security policy.All failures default to ASK (prompting you). The plugin never silently allows something it can't evaluate.
Read, Glob, Grep on files within the project root (excluding sensitive files).env, credentials.json, .ssh/, .aws/, secrets files)WebFetch, WebSearch)Everything else — Bash commands, Write, Edit, Agent, and any tool not covered by heuristics. Claude uses a three-tier security policy:
Decisions from Claude evaluation are cached per-project so the same command won't trigger re-evaluation.
claude --plugin-dir /path/to/sane-tool-use-plugin
Or clone it somewhere and point to it:
git clone <repo-url> ~/.claude/plugins/sane-tool-use-plugin
claude --plugin-dir ~/.claude/plugins/sane-tool-use-plugin
claude on PATH — used for evaluating ambiguous tool calls)Decisions are cached per-project at:
~/.claude/sane-tool-use-plugin/.cache/<project-id>.json
The project ID is derived from the git remote URL (repo name), or a hash of the working directory path for non-git projects.
Cache entries never expire. To reset decisions for a project, delete its cache file:
rm ~/.claude/sane-tool-use-plugin/.cache/<project-name>.json
To reset all cached decisions:
rm -rf ~/.claude/sane-tool-use-plugin/.cache/
sane-tool-use-plugin/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── hooks/
│ └── hooks.json # PreToolUse hook configuration
├── scripts/
│ ├── evaluate_tool_use.py # All evaluation logic (single file)
│ └── test_prompt.py # Prompt test runner (43 scenarios)
└── tests/
└── test_evaluate_tool_use.py # 73 unit/integration/E2E tests
python3 -m pytest tests/ -v
When Claude evaluates an ambiguous tool call, it applies this policy:
| Action | Decision |
|---|---|
| Read-only commands (ls, cat, grep, git status/log/diff) | ALLOW |
| Build/test/lint commands (npm test, pytest, eslint, make) | ALLOW |
| File writes/edits within project (recoverable via git) | ALLOW |
| Deleting git-tracked files (recoverable via git checkout) | ALLOW |
| Inline scripts with visible content (echo "..." | node) | ALLOW |
| Git commits, branch creation, checkout | ALLOW |
| Package install for project (npm install, pip install -r) | ALLOW |
| Deleting untracked/git-ignored files | ASK |
| Opaque script execution (bash deploy.sh, node script.js) | ASK |
| Network-facing commands (starting servers, opening ports) | ASK |
| Package publish or global install | ASK |
| Anything uncertain | ASK |
| Destructive commands outside git (rm -rf /, dd, wipefs) | DENY |
| Rewriting git history (reset --hard, push --force) | DENY |
| Secret exfiltration (env | curl, cat ~/.ssh/id_rsa | nc) | DENY |
| Downloading and executing remote code (curl | bash) | DENY |
The prompt test runner validates evaluation behavior across Claude models:
# Run all 43 scenarios with default model (sonnet)
python3 scripts/test_prompt.py
# Test with cheapest/fastest model
python3 scripts/test_prompt.py --model haiku
# Test with opus at low effort
python3 scripts/test_prompt.py --model opus --effort low
# Run a single scenario for debugging
python3 scripts/test_prompt.py --scenario "rm -rf root"
The test runner reports pass/fail per scenario with latency, and exits non-zero if any scenario fails.
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 jeremygiberson/sane-tool-use-plugin --plugin sane-tool-usePlugins from other owners that cover similar ground