bash-smart-approve:install

bash-smart-approve:install is a skill for Claude Code from pr3m/claude-code-bash-smart-approve. It costs 54 tokens per session (991 once invoked), scanned C, original, MIT.

An installation procedure for bash-smart-approve, a tool that manages automatic approval rules for Bash commands in Claude Code. It checks required tools, finds the installation mode, configures the hook, and can import existing rules.

In plain words
What is it for?
Use it after cloning bash-smart-approve or when setting it up and connecting its hook to Claude Code.
Why use it?
It removes the manual setup work and checks prerequisites before enabling command approval.

Skill for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

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

Good fit Use it after cloning bash-smart-approve or when setting it up and connecting its hook to Claude Code.

Compare 6 skills from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add pr3m/claude-code-bash-smart-approve
Claude Code
/plugin install 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:install

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/install"><img src="https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/install.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 991 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. 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.00054 $0.00991
Opus 5.5 $0.00022 $0.00396
Sonnet 5.5 $0.00011 $0.00198
Haiku 4.5 $0.00005 $0.00099

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

Security

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

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)
plugins/bash-smart-approve/skills/install/SKILL.md · 97 lines

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 shfmt or choco install shfmt

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_ROOT is set (plugin came from /plugin install). The plugin's own hooks/hooks.json is auto-registered by Claude Code; skip Step 3 entirely. Verify $CLAUDE_PLUGIN_ROOT/hooks/approve.js exists, then continue at Step 4.
  • Local / manual install — $CLAUDE_PLUGIN_ROOT is unset. Ask the user: "Where did you clone this repo?" Default suggestion: ~/dev/claude-code-bash-smart-approve. Verify hooks/approve.js exists. 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).

Read the full file on GitHub · 97 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 · 97 lines · 54 tokens per session scan C ceb16445c84a

Subscribe to this mod's changes

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