bash-smart-approve:import

bash-smart-approve:import is a skill for Claude Code from pr3m/claude-code-bash-smart-approve. It costs 57 tokens per session (1,096 once invoked), scanned D, original, MIT.

A skill for importing existing Claude Code terminal permission rules from settings files into the configuration used by bash-smart-approve. It reads allowed Bash commands and converts their patterns into the new format.

In plain words
What is it for?
Use it during setup or migration when you already have Bash command rules in Claude Code settings and want to reuse the allowed commands.
Why use it?
It avoids recreating an existing command allowlist by hand when moving to bash-smart-approve. It ignores unrelated permission types and denied or approval-request rules.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/.../bin/X.

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

Good fit Use it during setup or migration when you already have Bash command rules in Claude Code settings and want to reuse the allowed commands.

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:import

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pr3m/claude-code-bash-smart-approve/import"><img src="https://agentmods.dev/badge/skills/pr3m/claude-code-bash-smart-approve/import.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,096 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 4 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.00057 $0.01096
Opus 5.5 $0.00023 $0.00438
Sonnet 5.5 $0.00011 $0.00219
Haiku 4.5 $0.00006 $0.00110

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

Security

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 3mo 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
plugins/bash-smart-approve/skills/import/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.

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):

  1. ~/.claude/settings.json (user-global)
  2. <cwd>/.claude/settings.json (project, committed)
  3. <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>):

  1. Strip the Bash( prefix and trailing ).
  2. Normalize the pattern:
    • If it starts with $HOME/, $HOME\, ~/, or ~\ → strip that prefix.
    • If it starts with an absolute path like /Users/.../bin/X or /usr/bin/X → keep only the last segment (X).
    • Strip trailing .exe.
  3. Identify the first token (the binary name):
    • Pattern git * → binary git
    • Pattern npm view:* → binary npm
    • Pattern aws-vault exec:* → binary aws-vault
    • Pattern bin/jira:* → binary jira
  4. Classify:
    • shell interpreter (bash, sh, zsh, sudo, python, node -e, xargs, env, etc.) → skip with a warning to the user: "Rule Bash(bash:*) cannot be imported — shell interpreters are hard-denied for security."
    • 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 broad to auto-allow).
    • 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.
    • anything else → add the binary to allowedBinaries.

Step 3 — Dedupe and propose diff

Merge against the existing bash-smart-approve config (don't re-add things already present).

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. 3mo ago First seen · 97 lines · 57 tokens per session scan D 7d9bd37da863

Subscribe to this mod's changes

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

Related

bash-smart-approve:import compared with skills from other repositories

bash-smart-approve:import next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bash-smart-approve:importpr3m/claude-code-bash-smart-approveSkill17mo agoMITD57Claude Code
explain-last-decisionfatmo666/CaushellSkill5yesterdayApache-2.0A22Claude Code
session-summaryfatmo666/CaushellSkill5yesterdayApache-2.0A19Claude Code
bash-defensive-patternsmartineserios/thebranaSkill310d agoMITA36Claude Code
time-awarenessAraneaDev/claude-timestampSkill31mo agoMITA79Claude Code
timestampsAraneaDev/claude-timestampSkill31mo agoMITA39Claude Code
emoji-git-workflownirholas/gitprettySkill2320d agononeA48Claude Code