Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/pr3m/claude-code-bash-smart-approve/allownpx skills add pr3m/claude-code-bash-smart-approve --skill allowgit clone --depth 1 https://github.com/pr3m/claude-code-bash-smart-approveWhat 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 | $0.00053 | $0.00655 |
| Opus 5 | $0.00026 | $0.00328 |
| Sonnet 5 | $0.00011 | $0.00131 |
| Haiku 4.5 | $0.00005 | $0.00065 |
Grade A, and why
bash-smart-approve:allow scanned grade A with 1 finding 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 yesterday.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
4. For `curl` / `wget` — extract the target domain(s) from http(s) URLs. How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Allow a Bash Pattern
Edit the bash-smart-approve config to auto-approve a recently prompted (or user-supplied) command.
Step 1 — Get the command
If $ARGUMENTS contains a command, use it. Otherwise ask the user:
"Which exact command should I add to the allowlist? Paste it as-is."
Step 2 — Analyze
Tokenize the command mentally the same way the hook does:
- Split on
&&,||,;,|. Strip subshells$(...)/ backticks /<(...)and recurse into them. - Strip env-var prefixes (
FOO=bar CMD …→ the invoked binary isCMD). - For each segment, identify the invoked binary.
- For
curl/wget— extract the target domain(s) from http(s) URLs. - For
rm— extract the target path(s).
Refuse to auto-allow shell interpreters (bash, sh, zsh, python -c, node -e, sudo, xargs, env, eval, source, ssh) — the hook hard-denies these and adding them is unsafe.
Step 3 — Choose config scope
Ask the user:
"Add to user-global config (applies everywhere) or project-level
.claude/bash-smart-approve.json(committed with the repo, shared with teammates)?"
Locations:
- User-global:
$CLAUDE_PLUGIN_DATA/config.jsonif the plugin is installed via marketplace, otherwise~/.claude/bash-smart-approve.json. - Project:
<repo-root>/.claude/bash-smart-approve.json.
Step 4 — Propose the minimal diff
Show the user the smallest change that makes the command pass:
- Only a new binary? → add to
allowedBinaries. - Only a new curl/wget host? → add to
allowedCurlDomains(glob-capable, e.g.*.example.com). - Only a new
rmpath? → add toallowedRmPaths(glob-capable, e.g./tmp/**).
Prefer narrow domains/paths over broad ones. Never propose * as a value.
Step 5 — Apply
On approval, Edit the target config file. Create it (with the default JSON shape) if it doesn't exist yet. Preserve existing entries — merge, don't replace.
Step 6 — Confirm
Tell the user what was added, and where. Config reload is automatic on the next hook invocation — no restart needed.
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.
- yesterday First seen · 56 lines · 53 tokens per session scan A aa1275fc45f7
bash-smart-approve:allow is a skill published in the GitHub repository pr3m/claude-code-bash-smart-approve (1 stars, last pushed 4mo ago), licensed MIT. It adds 53 tokens to every session and 655 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
x-nets
Enhanced netstat module with cached data and structured output. View network connections, routing tables, and interface statistics in interactive or TSV/CSV formats. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.
x-mankier
Search and browse man pages from ManKier.com. Command line interface for ManKier man page repository. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.
x-osv
CLI for Google OSV database. Query vulnerabilities for packages, scan local projects for vulnerable dependencies. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill). Required Tool: Install osv-scanner for project scanning (see https://github.com/google/osv-scanner).
rule
Skill "rule" from x-cmd/x-cmd, covering rule — rules to rule, 核心命令, 规则文件格式, 示例 and 验证规则文件格式.
wikipedia
Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.
cve
Look up CVE records via x cve — cached, zero-API-key, daily xz TSV. Load for cve, vulnerability id, kev, epss, nvd, cvelist, or security advisory.