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/importnpx skills add pr3m/claude-code-bash-smart-approve --skill importgit 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.00057 | $0.01096 |
| Opus 5 | $0.00028 | $0.00548 |
| Sonnet 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 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.
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.
- 2d 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 4mo ago), licensed MIT. It adds 57 tokens to every session and 1,096 once invoked, about $0.0003 per session on Opus 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.
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.