bash-pro

bash-pro is a skill for Claude Code, Codex from radif-ru/ai-multi-agent-system. It costs 65 tokens per session (1,850 once invoked), scanned B, original, MIT.

A guide for writing safer Bash scripts for production work. It covers strict error handling, input checks, cleanup, tests with Bats and static checks with ShellCheck.

In plain words
What is it for?
Creating or reviewing Bash scripts used in CI/CD, operations and automation, with attention to security, portability and testing.
Why use it?
It helps prevent scripts from silently continuing after errors, mishandling input or leaving temporary resources behind.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Creating or reviewing Bash scripts used in CI/CD, operations and automation, with attention to security, portability and testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/radif-ru/ai-multi-agent-system/bash-pro
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.

Any agent
npx skills add radif-ru/ai-multi-agent-system --skill bash-pro
Clone the repo
git clone --depth 1 https://github.com/radif-ru/ai-multi-agent-system

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/bash-pro/github.svg)](https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/bash-pro)
Your own site
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/bash-pro"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/bash-pro/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-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/bash-pro"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/bash-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,850 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00065 $0.01850
Opus 5.5 $0.00026 $0.00740
Sonnet 5.5 $0.00013 $0.00370
Haiku 4.5 $0.00006 $0.00185

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

Security

Grade B, and why

bash-pro scanned grade B 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 3mo 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 deletemediumDestructive command

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

trap 'rm -rf "$tmpdir"' EXIT

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

app/skills/bash-pro/SKILL.md · 141 lines

How it starts

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

Skill: bash-pro

Углублённый профиль для написания и ревью Bash-скриптов с упором на безопасность, переносимость и тестируемость.

Когда использовать

  • Пишешь или ревьюишь Bash-скрипт для автоматизации, CI/CD или ops.
  • Усиливаешь существующий shell-скрипт по безопасности и переносимости.

Когда не использовать

  • Нужен только POSIX-shell без bash-расширений.
  • Логика сложная — лучше Python/Go.
  • Нужна нативная Windows-автоматизация — это PowerShell.

Алгоритм

  1. Зафиксируй вход, выход и режимы отказа скрипта.
  2. Включи strict mode и безопасный парсинг аргументов.
  3. Реализуй основную логику с защитными паттернами.
  4. Покрой bats (тесты) и shellcheck (статический анализ).

Strict mode и базовая защита

#!/usr/bin/env bash
set -Eeuo pipefail
shopt -s inherit_errexit
IFS=$'\n\t'

# Каталог скрипта (надёжно, с символлинками)
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"

# Trap на ошибки и финальную очистку
trap 'echo "Error at line $LINENO: exit $?" >&2' ERR
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT

Ключевые правила

  • Всегда оборачивай переменные в кавычки ("$var") — иначе word-splitting и globbing создадут трудно ловимые баги.
  • Не используй eval на пользовательском вводе — используй массивы для динамического построения команд.
  • Заменяй for f in $(ls) на find ... -print0 | while IFS= read -r -d '' f; do ...; done (NUL-safe).
  • Завершай парсинг опций через --: rm -rf -- "$user_input".
  • Валидируй обязательные переменные: : "${REQUIRED_VAR:?not set}".
  • Объявляй константы как readonly, локальные переменные функций — через local.
  • mktemp + trap для всех временных файлов и каталогов.
  • printf вместо echo для предсказуемого форматирования.
  • $( ) вместо backticks — читаемее и nestable.
  • Bash 4.4+ для inherit_errexit — иначе set -e не пробрасывается через подоболочки.
  • Проверка версии Bash: (( BASH_VERSINFO[0] >= 4 && BASH_VERSINFO[1] >= 4 )).

Read the full file on GitHub · 141 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. 3mo ago First seen · 141 lines · 65 tokens per session scan B 62adbbaa55b1

Subscribe to this mod's changes

bash-pro is a skill published in the GitHub repository radif-ru/ai-multi-agent-system (6 stars, last pushed 1mo ago), licensed MIT. It adds 65 tokens to every session and 1,850 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

bash-pro compared with skills from other repositories

bash-pro next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bash-proradif-ru/ai-multi-agent-systemSkill61mo agoMITB65Claude Code, Codex
ai-portable-setupellmos-ai/skillsSkill10yesterdayMITA119Claude Code, Codex
skill-creatorMRWillisT/PullNexusSkill86mo agononeA64Claude Code
ai-image-color-cyclingMRWillisT/PullNexusSkill86mo agononeA272Claude Code, Codex
algorithmic-artMRWillisT/PullNexusSkill86mo agononeA62Claude Code
docxMRWillisT/PullNexusSkill86mo agononeA168Claude Code
frontend-slidesMRWillisT/PullNexusSkill86mo agononeA63Claude Code, Codex