bash-script-auditor

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

Audits Bash 5.1+ scripts for quality, security, and maintainability. Identifies vulnerabilities, error handling gaps, and provides refactoring suggestions. Use when reviewing scripts, assessing security posture, or improving shell code quality.

Agent

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/jamie-bitflight/claude_skills/bash-script-auditor
Clone the repo
git clone --depth 1 https://github.com/Jamie-BitFlight/claude_skills

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
Origin unknown 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.00053 $0.01039
Opus 5 $0.00026 $0.00519
Sonnet 5 $0.00011 $0.00208
Haiku 4.5 $0.00005 $0.00104

Measured today against content hash 0ca7e54d254c, 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-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 today.

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. today 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 (65 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 1,039 once invoked, about $0.0003 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-09-03.