linux-bash-scripting

linux-bash-scripting is a skill for Claude Code from iliaal/ai-skills. It costs 44 tokens per session (1,324 once invoked), scanned C, original, MIT.

A set of instructions for writing defensive Bash scripts on Linux. Bash is a command-line scripting language; ShellCheck checks scripts for common problems, and shfmt checks their formatting.

In plain words
What is it for?
Use it when creating Linux Bash scripts, scheduled cron jobs, or command-line tools, including argument parsing and production scripts.
Why use it?
It helps avoid unsafe shell behavior, unreliable file paths, weak error handling, and script-quality warnings.

Skill for Claude Code

Written for Claude Code: paths in frontmatter.

Good fit Use it when creating Linux Bash scripts, scheduled cron jobs, or command-line tools, including argument parsing and production scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/ai-skills/linux-bash-scripting
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 iliaal/ai-skills --skill linux-bash-scripting
Clone the repo
git clone --depth 1 https://github.com/iliaal/ai-skills

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 linux-bash-scripting

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/iliaal/ai-skills/linux-bash-scripting"><img src="https://agentmods.dev/badge/skills/iliaal/ai-skills/linux-bash-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,324 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.00044 $0.01324
Opus 5.5 $0.00018 $0.00530
Sonnet 5.5 $0.00009 $0.00265
Haiku 4.5 $0.00004 $0.00132

Measured 13d ago against content hash c91aa3d85ef0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

linux-bash-scripting 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 13d 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.

trap 'rm -rf -- "${_tmpdir:-}"' EXIT
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/linux-bash-scripting/SKILL.md · 96 lines

How it starts

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

Linux Bash Scripting

Produce bash scripts that pass shellcheck --enable=all and shfmt -d with zero warnings.

Target: GNU Bash 4.4+ on Linux. No macOS/BSD workarounds, no Windows paths, no POSIX-only restrictions.

Script Foundation

#!/usr/bin/env bash
set -Eeuo pipefail
shopt -s inherit_errexit

SCRIPT_DIR=$(dirname -- "${BASH_SOURCE[0]}") || exit "$?"
SCRIPT_DIR=$(cd -- "${SCRIPT_DIR}" && pwd -P) || exit "$?"
readonly SCRIPT_DIR

trap 'printf "Error at %s:%d\n" "${BASH_SOURCE[0]}" "$LINENO" >&2' ERR
trap 'rm -rf -- "${_tmpdir:-}"' EXIT
  • -E propagates ERR traps into functions
  • inherit_errexit propagates errexit into $() command substitutions
  • Resolve the script's own data files against SCRIPT_DIR, never the caller's cwd or git rev-parse --show-toplevel. A shared linter invoked from another project's git hook, a cron job, or a wrapper runs with someone else's cwd, so a caller-relative rules path resolves to a file that does not exist: the rule set loads empty, zero violations are found, exit 0. It is a silent no-op, not an error, and running it from inside its own repo passes for the wrong reason. Exercise it once from a scratch directory that is not the script's own tree
  • Always create temp dirs under the EXIT trap: _tmpdir=$(mktemp -d)
  • Wrap the body in a main function. Guard its invocation so direct execution runs it and sourcing only defines functions for testing.

Core rules

  • Quote expansions, use arrays for commands, and never evaluate external data as shell code.
  • Validate numeric syntax, sign, and application bounds before arithmetic. Convert unsigned digits with 10# before applying the sign; 10#-08 is invalid.
  • Keep secrets out of process arguments and tracing. Feed them through stdin and use a JSON-aware encoder.
  • Check exact exit statuses where “absent” differs from “failed to inspect.” Separate local and readonly declarations from command substitutions.
  • Use NUL-delimited file iteration, validate required flag values, and reject conflicting output/target combinations.
  • For atomic replacement, stage beside the destination; for multi-file activation, switch a single staged release reference.
  • Preserve unrelated files and report the actual signal or command status after cleanup.
  • Do not assume Bash options work in sh, GNU utility modes behave like syscall modes, or a configured fallback path is usable.

Read the full file on GitHub · 96 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago Changed · +5 lines c91aa3d85ef0
  2. 21d ago Changed · +1 lines c68f23853020
  3. 28d ago Changed 7284c9c78e01
  4. 1mo ago Changed · +2 lines 4110ef9dbbf3
  5. 1mo ago Changed · -112 lines bcfe906b90cf
  6. 1mo ago Changed · +3 lines 3fb2d667c0d9
  7. 1mo ago First seen · 197 lines · 44 tokens per session scan C ecc2540b1a44

Subscribe to this mod's changes

linux-bash-scripting is a skill published in the GitHub repository iliaal/ai-skills (45 stars, last pushed 6d ago), licensed MIT. It adds 44 tokens to every session and 1,324 once invoked, about $0.0002 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 skills, from other repositories

uv-usage

Provides concise guidance for using uv (Python package manager), including project workflows, pip-compatible commands, Python version management, and PEP 723 inline script dependencies. Use when users mention uv, uv run, inline dependencies, PEP 723, or Python dependency/project management.

liatrio-labs/ai-prompts · 59 tokens

typescript-advanced-types

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

chidekina/aria-superpowers · 57 tokens

react-dev

This skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components are mentioned. Covers type-safe patterns for React 18-19 including generic components, proper event typing, and routing integration (TanStack Router, React…

chidekina/aria-superpowers · 66 tokens

java-boilerplate

Gera automaticamente getters, setters, construtores, toString, equals e hashCode para classes Java. Triggers on: /java-boilerplate, 'gerar métodos java', 'criar getters setters'.

chidekina/aria-superpowers · 48 tokens

omh-rust

This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 74 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens