bash-analyze

bash-analyze is a command for Claude Code from JosiahSiegel/claude-plugin-marketplace. It costs 20 tokens per session (933 once invoked), scanned A, original, MIT.

A command for examining Bash scripts for security, speed, portability, and common good practices.

In plain words
What is it for?
Use it to analyze Bash scripts, check compatibility with Bash or POSIX features, and identify ShellCheck and platform-specific concerns.
Why use it?
It finds issues such as unsafe variable handling, command injection, inefficient loops, and differences between operating systems before the script is used.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the bash-master plugin — 10 skills, 4 commands, 1 agent shipped together

Good fit Use it to analyze Bash scripts, check compatibility with Bash or POSIX features, and identify ShellCheck and platform-specific concerns.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/josiahsiegel/claude-plugin-marketplace/bash-analyze
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.

Clone the repo
git clone --depth 1 https://github.com/JosiahSiegel/claude-plugin-marketplace

Made for: Claude Code.

Or install bash-master, the plugin that ships this one along with the rest of its 10 skills, 4 commands, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/josiahsiegel/claude-plugin-marketplace/bash-analyze/github.svg)](https://agentmods.dev/commands/josiahsiegel/claude-plugin-marketplace/bash-analyze)
Your own site
<a href="https://agentmods.dev/commands/josiahsiegel/claude-plugin-marketplace/bash-analyze"><img src="https://agentmods.dev/badge/commands/josiahsiegel/claude-plugin-marketplace/bash-analyze/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-analyze

Your own site · 80×15
<a href="https://agentmods.dev/commands/josiahsiegel/claude-plugin-marketplace/bash-analyze"><img src="https://agentmods.dev/badge/commands/josiahsiegel/claude-plugin-marketplace/bash-analyze.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 933 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00020 $0.00933
Opus 5 $0.00010 $0.00466
Sonnet 5 $0.00004 $0.00187
Haiku 4.5 $0.00002 $0.00093

Measured 10d ago against content hash 3062f6e29679, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

bash-analyze 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 10d 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.

plugins/bash-master/commands/bash-analyze.md · 164 lines

How it starts

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

CRITICAL GUIDELINES

Windows File Path Requirements

MANDATORY: Always Use Backslashes on Windows for File Paths

When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).


Bash Script Analyzer

Purpose

Perform comprehensive analysis of bash scripts covering security vulnerabilities, performance issues, portability concerns, and adherence to modern best practices.

Analysis Categories

1. Security Analysis

  • Command injection vulnerabilities
  • Path traversal risks
  • Unsafe temporary file handling
  • Unquoted variable expansions
  • Privilege escalation risks
  • Sensitive data exposure
  • Race condition vulnerabilities

2. Performance Analysis

  • Unnecessary subshell spawning
  • Inefficient loops (UUOC, UUOG)
  • External command overuse vs bash builtins
  • Pipeline optimization opportunities
  • Array usage efficiency
  • Process substitution opportunities

3. Portability Analysis

  • Bash version compatibility (4.x, 5.x features)
  • POSIX compliance level
  • Platform-specific issues (Linux/macOS/BSD)
  • GNU vs BSD tool differences
  • Shebang portability

4. Best Practices Compliance

  • ShellCheck warnings (all severity levels)
  • Google Shell Style Guide adherence
  • Error handling patterns
  • Cleanup and trap usage
  • Function structure and modularity
  • Documentation and comments

Analysis Output Format

For each script analyzed, provide:

## Script: <filename>

### Security Issues
- [CRITICAL] <issue description>
- [HIGH] <issue description>
- [MEDIUM] <issue description>

### Performance Issues
- [IMPACT: HIGH] <issue description>
- [IMPACT: MEDIUM] <issue description>

### Portability Issues
- [Bash 5.x required] <feature used>
- [GNU-specific] <command/flag used>

### Best Practice Violations
- [ShellCheck SC####] <description>
- [Style] <description>

### Recommendations
1. <actionable recommendation>
2. <actionable recommendation>

### Score: X/100
- Security: X/25
- Performance: X/25
- Portability: X/25
- Best Practices: X/25

Read the full file on GitHub · 164 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. 10d ago First seen · 164 lines · 20 tokens per session scan A 3062f6e29679

Subscribe to this mod's changes

bash-analyze is a command published in the GitHub repository JosiahSiegel/claude-plugin-marketplace (54 stars, last pushed 2mo ago), licensed MIT. It adds 20 tokens to every session and 933 once invoked, about $0.0001 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-30.