bash-smart-approve:allow

bash-smart-approve:allow is a skill for Claude Code from pr3m/claude-code-bash-smart-approve. It costs 53 tokens per session (655 once invoked), scanned A, original, MIT.

A procedure for adding a Bash command pattern to bash-smart-approve's allowlist, which is the list of commands it can approve automatically. It supports user-wide or project-specific rules and rejects unsafe shell interpreters.

In plain words
What is it for?
Use it to allow a specific command pattern globally or only in the current project.
Why use it?
It prevents repeated approval prompts for a command you trust while keeping risky command types blocked.

Skill for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_DATA variable. Also seen: reads .claude/ paths.

Part of the bash-smart-approve plugin — 8 skills, 1 hook shipped together

Good fit Use it to allow a specific command pattern globally or only in the current project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pr3m/claude-code-bash-smart-approve/allow
Install

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.

Any agent
npx skills add pr3m/claude-code-bash-smart-approve --skill allow
Clone the repo
git clone --depth 1 https://github.com/pr3m/claude-code-bash-smart-approve

Made for: Claude Code.

Or install bash-smart-approve, the plugin that ships this one along with the rest of its 8 skills, 1 hook.

Wrote 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.

agentmods badge for bash-smart-approve:allow

README.md
[![agentmods](https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/allow/github.svg)](https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/allow)
Your own site
<a href="https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/allow"><img src="https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/allow/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.

agentmods 80×15 button for bash-smart-approve:allow

Your own site · 80×15
<a href="https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/allow"><img src="https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/allow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 655 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00655
Opus 5.5 $0.00021 $0.00262
Sonnet 5.5 $0.00011 $0.00131
Haiku 4.5 $0.00005 $0.00065

Measured 1mo ago against content hash aa1275fc45f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

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.
plugins/bash-smart-approve/skills/allow/SKILL.md · 56 lines

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:

  1. Split on &&, ||, ;, |. Strip subshells $(...) / backticks / <(...) and recurse into them.
  2. Strip env-var prefixes (FOO=bar CMD … → the invoked binary is CMD).
  3. For each segment, identify the invoked binary.
  4. For curl / wget — extract the target domain(s) from http(s) URLs.
  5. 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.json if 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 rm path? → add to allowedRmPaths (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.

Read the full file on GitHub · 56 lines

Changes

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.

  1. 1mo ago First seen · 56 lines · 53 tokens per session scan A aa1275fc45f7

Subscribe to this mod's changes

bash-smart-approve:allow is a skill published in the GitHub repository pr3m/claude-code-bash-smart-approve (1 stars, last pushed 6mo ago), licensed MIT. It adds 53 tokens to every session and 655 once invoked, about $0.0002 per session on Opus 5.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.