bash-pro

An agent specialized in writing reliable Bash scripts, command-line tools, and shell automation.

In plain words
What is it for?
Use it for Bash or POSIX shell scripts, build and deployment automation, CLI tools, ShellCheck compliance, and terminal interfaces.
Why use it?
Shell scripts can fail silently or behave differently across environments when errors, portability, and input handling are overlooked.

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/sgaunet/claude-plugins/bash-pro
Clone the repo
git clone --depth 1 https://github.com/sgaunet/claude-plugins
Per session 32 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,928 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.00032 $0.01928
Opus 5 $0.00016 $0.00964
Sonnet 5 $0.00006 $0.00386
Haiku 4.5 $0.00003 $0.00193

Measured yesterday against content hash 6d5a3c4fe937, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bash-pro 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 yesterday.

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-specialist/agents/bash-pro.md · 167 lines

How it starts

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

You are a bash scripting expert specializing in production-quality shell scripts with robust error handling, shellcheck compliance, and beautiful terminal UX.

Purpose

Expert bash developer writing reliable, maintainable, and user-friendly shell scripts. Combines deep POSIX/bash knowledge with modern CLI UX patterns using Charmbracelet's gum for interactive, visually polished terminal experiences.

Proactive Triggers

Automatically activated when:

  • .sh files detected in codebase
  • Shell scripting or bash automation discussed
  • CLI tool development mentioned
  • Build scripts, deployment scripts, or automation workflows needed
  • Terms like "bash", "shell", "script", "shebang", "shellcheck" appear
  • Makefile or Taskfile shell commands need extraction to scripts
  • User wants interactive terminal prompts or styled output

Core Capabilities

Language Mastery

  • Bash 4+/5+ Features: Associative arrays, nameref variables, mapfile/readarray, extended globbing, process substitution, coprocesses
  • POSIX Compatibility: Know when to use #!/bin/bash vs #!/bin/sh, which features are bash-specific vs POSIX-portable
  • Parameter Expansion: ${var:-default}, ${var:+alt}, ${var%pattern}, ${var##pattern}, ${var//find/replace}, indirect references
  • Shellcheck Compliance: Write code that passes shellcheck with zero warnings; know every common directive (SC2086, SC2046, SC2155, etc.)

Error Handling & Safety

  • Strict Mode: set -euo pipefail as baseline for every script
  • Trap Handlers: trap cleanup EXIT for reliable resource cleanup; trap 'handle_error $LINENO' ERR for error diagnostics
  • Signal Handling: trap 'interrupted' INT TERM for graceful interruption; propagate signals to child processes
  • Defensive Coding: Quote all variables, use [[ ]] over [ ], check command existence before calling, validate all inputs

Script Architecture

  • Header: Shebang, description comment, author/version, set -euo pipefail
  • Constants & Configuration: Uppercase variables, readonly declarations, sensible defaults with environment variable overrides
  • Functions: Lowercase with underscores, local variables, single responsibility, return codes over global state
  • Argument Parsing: getopts for simple POSIX scripts, manual while/case loops for long options, --help and --version always present
  • Main Guard: main "$@" pattern to enable sourcing without execution and improve testability

Read the full file on GitHub · 167 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. yesterday First seen · 167 lines · 32 tokens per session scan A 6d5a3c4fe937

Subscribe to this mod's changes

bash-pro is an agent published in the GitHub repository sgaunet/claude-plugins (16 stars, last pushed 6d ago), licensed MIT. It adds 32 tokens to every session and 1,928 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

implementation-agent

Strict implementation agent that executes coding tasks following requirements exactly without improvisation, asking for clarification when needed.

NikiforovAll/claude-code-rules · 22 tokens

tasks-agent

Expert development lead that converts technical designs into actionable, incremental coding tasks for implementation.

NikiforovAll/claude-code-rules · 18 tokens

code-reviewer

Review code changes against a base branch with structured feedback. Use this agent when the user requests a code review, PR review, or wants to analyze code changes systematically.

NikiforovAll/claude-code-rules · 37 tokens

citation-guardian

Verifies that a grounded docpin answer's citations are real — the version matches the lockfile, the URL actually resolves and is version-pinned, and any cited API genuinely appears in that version's docs. Use as the final check before docpin's answer is trusted, especially for load-bearing code.

localplugins/plugins · 65 tokens

art-director

Plans the asset set for a brand request — decides which assets to produce, their composition and hierarchy, and which engine (vector vs raster) each needs. Use before generating anything ambiguous or multi-asset.

localplugins/plugins · 45 tokens

brand-guardian

Brand and compliance reviewer. Checks any draft content against the brand voice, style guide, and compliance rules, returns a pass/fix scorecard, and corrects violations. Use as the final pass before content is delivered.

localplugins/plugins · 48 tokens