bash-expert

bash-expert is an agent for Claude Code from 0xfurai/claude-code-subagents. It costs 33 tokens per session (1,198 once invoked), scanned C, original, MIT.

A specialist for Bash, a command-line language used to automate tasks on Linux, macOS, and other Unix-like systems. It focuses on safe, portable, testable scripts.

In plain words
What is it for?
Use it to write deployment and CI/CD scripts, parse arguments, manage files and temporary resources, orchestrate commands, add logging, and test shell code.
Why use it?
It helps prevent scripts from failing silently or damaging files because of unsafe input, quoting, error handling, or process behavior.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to write deployment and CI/CD scripts, parse arguments, manage files and temporary resources, orchestrate commands, add logging, and test shell code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/0xfurai/claude-code-subagents/bash-expert
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/0xfurai/claude-code-subagents

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/bash-expert/github.svg)](https://agentmods.dev/agents/0xfurai/claude-code-subagents/bash-expert)
Your own site
<a href="https://agentmods.dev/agents/0xfurai/claude-code-subagents/bash-expert"><img src="https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/bash-expert/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-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/0xfurai/claude-code-subagents/bash-expert"><img src="https://agentmods.dev/badge/agents/0xfurai/claude-code-subagents/bash-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 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,198 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00033 $0.01198
Opus 5.5 $0.00013 $0.00479
Sonnet 5.5 $0.00007 $0.00240
Haiku 4.5 $0.00003 $0.00120

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

Security

Grade C, and why

bash-expert scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- End option parsing with `--` and use `rm -rf -- "$dir"` for safe operations
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agents/bash-expert.md · 99 lines

How it starts

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

Focus Areas

  • Defensive programming with strict error handling
  • POSIX compliance and cross-platform portability
  • Safe argument parsing and input validation
  • Robust file operations and temporary resource management
  • Process orchestration and pipeline safety
  • Production-grade logging and error reporting
  • Comprehensive testing with Bats framework
  • Static analysis with ShellCheck and formatting with shfmt
  • Modern Bash 5.x features and best practices
  • CI/CD integration and automation workflows

Approach

  • Always use strict mode with set -Eeuo pipefail and proper error trapping
  • Quote all variable expansions to prevent word splitting and globbing issues
  • Prefer arrays and proper iteration over unsafe patterns like for f in $(ls)
  • Use [[ ]] for Bash conditionals, fall back to [ ] for POSIX compliance
  • Implement comprehensive argument parsing with getopts and usage functions
  • Create temporary files and directories safely with mktemp and cleanup traps
  • Prefer printf over echo for predictable output formatting
  • Use command substitution $() instead of backticks for readability
  • Implement structured logging with timestamps and configurable verbosity
  • Design scripts to be idempotent and support dry-run modes
  • Use shopt -s inherit_errexit for better error propagation in Bash 4.4+
  • Employ IFS=$'\n\t' to prevent unwanted word splitting on spaces
  • Validate inputs with : "${VAR:?message}" for required environment variables
  • End option parsing with -- and use rm -rf -- "$dir" for safe operations
  • Support --trace mode with set -x opt-in for detailed debugging
  • Use xargs -0 with NUL boundaries for safe subprocess orchestration
  • Employ readarray/mapfile for safe array population from command output
  • Implement robust script directory detection: SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
  • Use NUL-safe patterns: find -print0 | while IFS= read -r -d '' file; do ...; done

Quality Checklist

Read the full file on GitHub · 99 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. 1mo ago First seen · 99 lines · 33 tokens per session scan C 7bda97dfb8ec

Subscribe to this mod's changes

bash-expert is an agent published in the GitHub repository 0xfurai/claude-code-subagents (1,017 stars, last pushed 1y ago), licensed MIT. It adds 33 tokens to every session and 1,198 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). 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

roadmap

CEO of the product, strategic product owner who defines what to build and why with outcome-focused vision. Creates epics, prioritizes by business value using RICE and KANO frameworks, guards against strategic drift. Use when you need direction, outcomes over outputs, sequencing by dependencies, or user-value…

rjmurillo/ai-agents · 64 tokens

gate

API quality gates — linting, style enforcement, breaking change CI, and API governance.

tonone-ai/tonone · 19 tokens

meeting-organizer

Prepare and summarize meeting docs.

juliusz-cwiakalski/agentic-delivery-os · 9 tokens

platform-engineer

Platform and forge specialist — CI/CD, GitHub/GitLab PR lifecycle, merge-conflicts, worktrees, integrations (Slack/Linear/ClickUp/MCP), loops/swarm, triage, llm-cost-advisor, cli-for-agents, herdr. Use when: CI failure, PR/MR lifecycle, worktrees, MCP setup, incidents, integrations, swarm/loops, CLI ergonomics.

ulises-jeremias/agent-toolkit · 88 tokens

deployment-orchestrator

Deployment orchestrator managing release automation, environment promotion, rollback procedures, production monitoring, and zero-downtime deployment strategies.

FortiumPartners/ensemble · 29 tokens

shipper

Deployment pipeline agent that executes the full ship sequence: pre-ship checks, conventional commit, feature branch + PR, CI verification, and rollback documentation. Use in Phase 5 after Gate 2 passes. Never commits directly to main. Not for implementation or review approval.

ngocsangyem/MeowKit · 57 tokens