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.
/plugin marketplace add pr3m/claude-code-bash-smart-approve/plugin install bash-smart-approveWrote 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.
[](https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/import)<a href="https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/import"><img src="https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/import/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.
<a href="https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/import"><img src="https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/import.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00057 | $0.01096 |
| Opus 5.5 | $0.00023 | $0.00438 |
| Sonnet 5.5 | $0.00011 | $0.00219 |
| Haiku 4.5 | $0.00006 | $0.00110 |
Grade D, and why
bash-smart-approve:import scanned grade D with 4 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 3mo 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
1. `~/.claude/settings.json` (user-global) Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
- **Absolute path to user binary** (`/home/alice/bin/mytool:*`) → extract `mytool`, add as binary. Note to the user: the plugin uses `$PATH` resolution, so `mytool` must be in `PATH` at runtime. Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- **`rm` or `rmdir`** → try to extract path arguments. If the pattern is too broad (`rm *` / `rm -rf *`), skip with a warning. If concrete paths are present (`/tmp/jira*`), add to `allowedRmPaths`. Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **`curl` or `wget`** → also try to extract a domain from the pattern (regex: `[a-zA-Z0-9*.-]+\.[a-zA-Z]{2,}`). If a domain is found, add it to `allowedCurlDomains`. If no domain is extractable, skip with a note (too br How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Import Existing Allow Rules
Convert Bash(...) permission rules from Claude Code settings into bash-smart-approve config.
Step 1 — Locate settings files
Read (in order of precedence, later overrides earlier):
~/.claude/settings.json(user-global)<cwd>/.claude/settings.json(project, committed)<cwd>/.claude/settings.local.json(project, gitignored)
Also check ~/.claude/settings.local.json if it exists.
For each file, extract permissions.allow array. Ignore permissions.deny, permissions.ask, and non-Bash rules (e.g. Read(...), Edit(...), mcp__...).
Step 2 — Parse each Bash(...) rule
For every string matching Bash(<pattern>):
- Strip the
Bash(prefix and trailing). - Normalize the pattern:
- If it starts with
$HOME/,$HOME\,~/, or~\→ strip that prefix. - If it starts with an absolute path like
/Users/.../bin/Xor/usr/bin/X→ keep only the last segment (X). - Strip trailing
.exe.
- If it starts with
- Identify the first token (the binary name):
- Pattern
git *→ binarygit - Pattern
npm view:*→ binarynpm - Pattern
aws-vault exec:*→ binaryaws-vault - Pattern
bin/jira:*→ binaryjira
- Pattern
- Classify:
- shell interpreter (
bash,sh,zsh,sudo,python,node -e,xargs,env, etc.) → skip with a warning to the user: "RuleBash(bash:*)cannot be imported — shell interpreters are hard-denied for security." curlorwget→ also try to extract a domain from the pattern (regex:[a-zA-Z0-9*.-]+\.[a-zA-Z]{2,}). If a domain is found, add it toallowedCurlDomains. If no domain is extractable, skip with a note (too broad to auto-allow).rmorrmdir→ try to extract path arguments. If the pattern is too broad (rm */rm -rf *), skip with a warning. If concrete paths are present (/tmp/jira*), add toallowedRmPaths.- anything else → add the binary to
allowedBinaries.
- shell interpreter (
Step 3 — Dedupe and propose diff
Merge against the existing bash-smart-approve config (don't re-add things already present).
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.
- 3mo ago First seen · 97 lines · 57 tokens per session scan D 7d9bd37da863
bash-smart-approve:import is a skill published in the GitHub repository pr3m/claude-code-bash-smart-approve (1 stars, last pushed 7mo ago), licensed MIT. It adds 57 tokens to every session and 1,096 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it D with 4 findings (reads agent configuration directories, unrestricted tool access, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
bash-smart-approve:import compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| bash-smart-approve:importpr3m/claude-code-bash-smart-approve | Skill | 1 | 7mo ago | MIT | D | 57 | Claude Code |
| explain-last-decisionfatmo666/Caushell | Skill | 5 | yesterday | Apache-2.0 | A | 22 | Claude Code |
| session-summaryfatmo666/Caushell | Skill | 5 | yesterday | Apache-2.0 | A | 19 | Claude Code |
| bash-defensive-patternsmartineserios/thebrana | Skill | 3 | 10d ago | MIT | A | 36 | Claude Code |
| time-awarenessAraneaDev/claude-timestamp | Skill | 3 | 1mo ago | MIT | A | 79 | Claude Code |
| timestampsAraneaDev/claude-timestamp | Skill | 3 | 1mo ago | MIT | A | 39 | Claude Code |
| emoji-git-workflownirholas/gitpretty | Skill | 23 | 20d ago | none | A | 48 | Claude Code |