bash-script-reviewer

bash-script-reviewer is an agent for Claude Code from iroha924/mumei. It costs 119 tokens per session (1,256 once invoked), scanned A, original, MIT.

A code reviewer for Bash shell scripts, which are text files containing commands run by a shell such as Bash.

In plain words
What is it for?
Use it to review one or more mumei hook scripts, or all Bash files in its hooks directories, before merging changes.
Why use it?
It catches portability, error-handling, JSON parsing, naming, logging, and output problems that can make hooks fail or confuse the hook parser. It also checks conventions specific to the mumei plugin.

Agent for Claude Code

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the mumei plugin — 11 skills, 10 agents, 18 hooks shipped together

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.

agentmods
npx agentmods add agents/iroha924/mumei/bash-script-reviewer
Clone the repo
git clone --depth 1 https://github.com/iroha924/mumei

Made for: Claude Code.

Or install mumei, the plugin that ships this one along with the rest of its 11 skills, 10 agents, 18 hooks.

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-script-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/iroha924/mumei/bash-script-reviewer.svg)](https://agentmods.dev/agents/iroha924/mumei/bash-script-reviewer)
Your own site
<a href="https://agentmods.dev/agents/iroha924/mumei/bash-script-reviewer"><img src="https://agentmods.dev/badge/agents/iroha924/mumei/bash-script-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 119 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,256 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00119 $0.01256
Opus 5 $0.00060 $0.00628
Sonnet 5 $0.00024 $0.00251
Haiku 4.5 $0.00012 $0.00126

Measured 4d ago against content hash 2a59d1558fcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bash-script-reviewer scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/bash-script-reviewer.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bash-script-reviewer

Reviews the quality of mumei's bash scripts (hooks/*.sh, hooks/_lib/*.sh). Output in English.

Input

From the user:

  • A single file: a relative path such as hooks/pre-edit-guard.sh
  • Multiple: space-separated, or "all hooks" / "all bash"
  • Nothing specified: review all of hooks/_lib/*.sh + hooks/*.sh

Review criteria

CRITICAL (must fix, before merge)

  • Shebang is not #!/usr/bin/env bash (hardcoded /bin/bash is less portable)
  • Missing set -u (undefined-variable detection disabled)
  • set -e enabled (mumei intentionally does not use it)
  • Escape hatch (MUMEI_BYPASS=1) check missing at the top
  • ${CLAUDE_PLUGIN_ROOT} referenced without the :- fallback
  • Public function missing the mumei_ prefix
  • gawk-only syntax used (3-argument match($0, /.../, arr), gensub(), etc.) → does not run on BSD awk
  • sed -i used without a fallback (BSD requires -i '')
  • stdin JSON string-processed with grep/awk instead of being parsed with jq (fragile)
  • Non-JSON written to stdout (breaks the hook output parser)

IMPORTANT (recommended improvements)

  • Logging via raw echo to stderr instead of the mumei_log_* functions
  • jq -r '.x' without the // empty fallback (null/missing handling)
  • Temp files at fixed paths instead of mktemp (race condition risk)
  • Rewriting files directly instead of using an atomic write (tmp + mv)
  • Running git commands without a guard like git rev-parse --git-dir >/dev/null 2>&1 (errors in git-less environments)
  • Variables without a local declaration (leaking scope outside the function)
  • Confusing a function's return with the script's exit
  • Discarding stderr as in if ! command 2>&1; then (hard to debug)

Read the full file on GitHub · 129 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. 4d ago First seen · 129 lines · 119 tokens per session scan A 2a59d1558fcd

Subscribe to this mod's changes

bash-script-reviewer is an agent published in the GitHub repository iroha924/mumei (2 stars, last pushed 4d ago), licensed MIT. It adds 119 tokens to every session and 1,256 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.