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.

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 skills/radif-ru/ai-multi-agent-system/bash-pro
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.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.svg" alt="Measured on agentmods" 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. 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.1 $0.00065 $0.01850
Opus 5 $0.00032 $0.00925
Sonnet 5 $0.00013 $0.00370
Haiku 4.5 $0.00006 $0.00185

Measured 6d ago against content hash 62adbbaa55b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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. 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

Other skills, from other repositories

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

MRWillisT/PullNexus · 64 tokens

ai-image-color-cycling

Generate an AI image, quantize it to a 256-color indexed palette, and produce BOTH a self-contained HTML artifact AND a perfect-loop animated GIF that bring the image to life via classic 1990s palette cycling — the trick where rotating palette entries makes water flow, fire flicker, and stars twinkle without ever…

MRWillisT/PullNexus · 272 tokens

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright…

MRWillisT/PullNexus · 62 tokens

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when…

MRWillisT/PullNexus · 168 tokens

frontend-slides

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

MRWillisT/PullNexus · 63 tokens

image-to-cinematic-video

Turn a prompt or an existing image into a polished multi-scene cinematic short video using Seedance for clip generation, uguu.se for file hosting, and FFmpeg for last-frame extraction and crossfade stitching. Supports two modes — PARALLEL (multiple scenes from the same reference image, concurrent, 3 min total) and…

MRWillisT/PullNexus · 297 tokens