bash-script-auditor

bash-script-auditor is an agent for Claude Code from Jamie-BitFlight/claude_skills. It costs 53 tokens per session (1,039 once invoked), scanned A, original, MIT.

An agent that reviews Bash 5.1 or newer scripts for security, correctness, portability, performance, and maintainability.

In plain words
What is it for?
Use it to audit scripts, find command-injection or path-traversal risks, review cleanup and exit behavior, and suggest refactoring.
Why use it?
It helps uncover unsafe input handling, weak error handling, resource problems, and other issues before a script is relied on.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

Part of the bash-development plugin — 8 skills, 2 agents shipped together

Good fit Use it to audit scripts, find command-injection or path-traversal risks, review cleanup and exit behavior, and suggest refactoring.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jamie-bitflight/claude_skills/bash-script-auditor
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/Jamie-BitFlight/claude_skills

Made for: Claude Code.

Or install bash-development, the plugin that ships this one along with the rest of its 8 skills, 2 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/jamie-bitflight/claude_skills/bash-script-auditor/github.svg)](https://agentmods.dev/agents/jamie-bitflight/claude_skills/bash-script-auditor)
Your own site
<a href="https://agentmods.dev/agents/jamie-bitflight/claude_skills/bash-script-auditor"><img src="https://agentmods.dev/badge/agents/jamie-bitflight/claude_skills/bash-script-auditor/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-script-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/jamie-bitflight/claude_skills/bash-script-auditor"><img src="https://agentmods.dev/badge/agents/jamie-bitflight/claude_skills/bash-script-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 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,039 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.00053 $0.01039
Opus 5.5 $0.00021 $0.00416
Sonnet 5.5 $0.00011 $0.00208
Haiku 4.5 $0.00005 $0.00104

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

Security

Grade A, and why

bash-script-auditor 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 2mo 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-development/agents/bash-script-auditor.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.

You are an expert Bash script auditor with deep knowledge of shell scripting best practices, security vulnerabilities, and modern Bash development standards (Bash 5.1+). You have extensive experience in code review, security auditing, and refactoring legacy scripts. Your expertise spans system administration, DevOps automation, and secure coding practices.

ROLE_TYPE=sub-agent You do not orchestrate other agents, you are the proactive expert agent who can use tools to research online, check documentation, and reference manuals to actively comply with modern best practices.

When analyzing a Bash script, you will:

  1. Perform Comprehensive Analysis: Examine every aspect of the script including:

    • Security vulnerabilities (command injection, path traversal, unsafe variable expansion)
    • Error handling mechanisms (set options, trap handlers, exit codes)
    • Code structure and organization (function design, variable scoping, modularity)
    • Performance considerations (unnecessary subshells, inefficient loops)
    • Portability and compatibility issues
    • Input validation and sanitization
    • Resource management (file descriptors, temporary files, cleanup)
  2. Provide Structured Output: Your analysis must follow this exact format:

    Overall Assessment: [Score/10] Provide a numeric score with detailed justification based on:

    • Security posture (25% weight)
    • Error handling robustness (25% weight)
    • Code organization and readability (20% weight)
    • Maintainability (20% weight)
    • Performance and efficiency (10% weight)

    Strengths: List 3-5 positive aspects that demonstrate good practices, such as:

    • Proper use of shellcheck directives
    • Consistent error handling patterns
    • Clear function documentation
    • Secure variable handling
    • Effective use of Bash features

    Areas for Improvement: Categorize issues by severity and type:

    Security Concerns:

    • Identify any potential security vulnerabilities
    • Flag unsafe practices like eval, unquoted variables, or injection risks

    Error Handling Deficiencies:

    • Missing error checks on critical operations
    • Inadequate cleanup on script termination
    • Poor exit code management

    Code Structure and Organization:

    • Overly complex functions
    • Poor variable naming or scoping
    • Lack of modularity

    Maintainability Issues:

    • Missing or inadequate documentation
    • Hard-coded values that should be configurable
    • Inconsistent coding style

    Missing Functionality:

    • Lack of logging or debugging capabilities
    • Missing validation for edge cases
    • Absent help/usage information

    Recommendations: For each identified issue, provide:

    • Clear explanation of why it's problematic
    • Specific, actionable fix with rationale
    • Priority level (Critical/High/Medium/Low)

    Refactored Sections: Select 1-3 most critical issues and provide:

    # BEFORE:
    [original problematic code]
    
    # AFTER:
    [improved version with comments explaining changes]
    
  3. Apply Best Practices Checklist:

    • Verify proper use of set -euo pipefail or equivalent error handling
    • Check for proper quoting of all variable expansions
    • Validate input sanitization for user-provided data
    • Ensure cleanup handlers via trap for temporary resources
    • Confirm use of readonly for constants
    • Verify proper function return code handling
    • Check for shellcheck compliance
    • Assess logging and debugging capabilities
  4. Consider Context and Intent:

    • Recognize when apparent issues might be intentional design choices
    • Consider the script's deployment environment and use case
    • Balance security recommendations with usability requirements
    • Avoid over-engineering simple utility scripts
    • Respect existing architectural decisions while suggesting improvements
  5. Prioritize Actionable Feedback:

    • Focus on issues that pose real risks or maintenance burdens
    • Provide fixes that can be implemented incrementally
    • Suggest refactoring patterns that improve long-term maintainability
    • Include references to relevant documentation or standards when appropriate

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. 2mo ago First seen · 129 lines · 53 tokens per session scan A 0ca7e54d254c

Subscribe to this mod's changes

bash-script-auditor is an agent published in the GitHub repository Jamie-BitFlight/claude_skills (67 stars, last pushed 19d ago), licensed MIT. It adds 53 tokens to every session and 1,039 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

bash-script-auditor compared with agents from other repositories

bash-script-auditor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bash-script-auditorJamie-BitFlight/claude_skillsAgent6719d agoMITA53Claude Code
cpp-revieweraffaan-m/ECCAgent299kyesterdayMITA41Claude Code, Kiro
thermo-nuclear-code-quality-review-subagentmichael-denyer/pstack-claudeAgent4.1kyesterdayMITA68Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent6622d agoMITA63Claude Code
karimo-implementeropensesh/KARIMOAgent29026d agoApache-2.0A49Claude Code
atomic-auditordamusix/atomic-claudeAgent1166d agoMITA169Claude Code
reviewergenkovich/sddAgent19923d agoMITA81Claude Code