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/installnpx skills add pr3m/claude-code-bash-smart-approve --skill installgit 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.00054 | $0.00991 |
| Opus 5 | $0.00027 | $0.00495 |
| Sonnet 5 | $0.00011 | $0.00198 |
| Haiku 4.5 | $0.00005 | $0.00099 |
Grade C, and why
bash-smart-approve:install scanned grade C with 2 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 2d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- Linux (Debian/Ubuntu): `sudo apt install shfmt` Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
## Step 3 — Wire the hook into ~/.claude/settings.json (manual install only) 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.
Install bash-smart-approve
Wire the plugin into Claude Code settings, create an initial config, and (optionally) import existing permission rules.
Step 1 — Preflight
Run shfmt --version via Bash.
- ✅ Installed → continue.
- ❌ Missing → tell the user the install command for their OS and stop:
- macOS:
brew install shfmt - Linux (Debian/Ubuntu):
sudo apt install shfmt - Linux (Fedora):
sudo dnf install shfmt - Windows:
scoop install shfmtorchoco install shfmt
- macOS:
Also confirm node --version ≥ 18.
Step 2 — Locate the plugin & determine install mode
Resolve the plugin root directory and pick one of two install modes:
- Marketplace install —
$CLAUDE_PLUGIN_ROOTis set (plugin came from/plugin install). The plugin's ownhooks/hooks.jsonis auto-registered by Claude Code; skip Step 3 entirely. Verify$CLAUDE_PLUGIN_ROOT/hooks/approve.jsexists, then continue at Step 4. - Local / manual install —
$CLAUDE_PLUGIN_ROOTis unset. Ask the user: "Where did you clone this repo?" Default suggestion:~/dev/claude-code-bash-smart-approve. Verifyhooks/approve.jsexists. Proceed to Step 3 to wire the hook manually.
Step 3 — Wire the hook into ~/.claude/settings.json (manual install only)
Skip this step if $CLAUDE_PLUGIN_ROOT was set in Step 2 — adding a second hook registration would fire the hook twice per Bash call.
Use the update-config skill (or direct Read + Edit) to add this hook to ~/.claude/settings.json, merging with any existing hooks.PreToolUse array:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"<plugin-root>/hooks/approve.js\"",
"timeout": 5
}
]
}
]
}
}
Use the absolute plugin path resolved in Step 2. On Windows, prefer forward slashes or %USERPROFILE% — both are accepted by Node.
Check for duplicates: if a hook already points at this approve.js, skip (don't add twice).
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.
- 2d ago First seen · 97 lines · 54 tokens per session scan C ceb16445c84a
bash-smart-approve:install is a skill published in the GitHub repository pr3m/claude-code-bash-smart-approve (1 stars, last pushed 4mo ago), licensed MIT. It adds 54 tokens to every session and 991 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ondb
A logical analysis and reasoning tool for AI. Use when decomposing documents into structured knowledge, querying entities and relations, validating consistency, or indexing files. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", "analyze this document", entity CRUD, or cross-skill…
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.
claw-heartbeat-delegation
Task delegation to the heartbeat agent via HEARTBEAT.md. Use when scheduling follow-ups, recurring checks, or recording background jobs for later monitoring.
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.