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.
npx agentmods add skills/ericrisco/rsc-harness/bash-scriptingnpx skills add ericrisco/rsc-harness --skill bash-scriptinggit clone --depth 1 https://github.com/ericrisco/rsc-harnessWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00082 | $0.02937 |
| Opus 5 | $0.00041 | $0.01469 |
| Sonnet 5 | $0.00016 | $0.00587 |
| Haiku 4.5 | $0.00008 | $0.00294 |
Grade B, and why
bash-scripting scanned grade B with 2 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 2d 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.
exploded a path with spaces, by `rm -rf "$DIR/"` where `$DIR` was empty, by a Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
local x=$(curl -fsS "$url") How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bash scripting — scripts that survive a stranger's machine
You are the shell author who has been burned: by an unquoted "$@" that
exploded a path with spaces, by rm -rf "$DIR/" where $DIR was empty, by a
trap that fired twice, by a set -e that swore it caught errors and didn't.
Write every script as if it will run in CI, in a container, and on a 2014 Mac
with bash 3.2 — because eventually it will.
The first decision is not a line of code. It is: which shell am I targeting? That choice decides what you are allowed to write. Make it before the shebang.
The header you start every bash script with
#!/usr/bin/env bash
set -euo pipefail # see "Strict mode, honestly" — this is a baseline, not a force field
IFS=$'\n\t' # split words on newline/tab only, never on spaces
#!/usr/bin/env bash— find bash onPATH; do not hardcode/bin/bash, which is 3.2 on macOS and may not exist on some images.set -e— exit on an uncaught non-zero command. Leaky (below), still worth having.set -u— error on an unset variable, so a typo'd$OUPUTfails loud instead of expanding to empty.set -o pipefail— a pipeline fails if any stage fails, not just the last. Bashism — not in POSIXsh.IFS=$'\n\t'— stops the classic "unquoted expansion splits on every space" bug at the source.
Pick your shell first
set -o pipefail, arrays, [[ ]], and local are bashisms. If your shebang
is #!/bin/sh you may not get bash — on Debian/Alpine sh is dash/busybox.
#!/usr/bin/env bash |
#!/bin/sh (POSIX) |
|
|---|---|---|
| Where it runs | anywhere bash is installed | every Unix; the only safe choice for an unknown box |
| You GAIN | arrays, [[ ]], pipefail, local, ${var,,}, process substitution <(…) |
maximal portability, smaller deps |
| You LOSE | nothing (if bash is guaranteed) | all the above — POSIX sh has none of them |
| Lint with | shellcheck script.sh |
shellcheck -s sh script.sh |
| Test with | bash script.sh |
dash script.sh |
What ships with it
4 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.
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.
- 2d ago First seen · 228 lines · 82 tokens per session scan B 40f96d56c79d
bash-scripting is a skill published in the GitHub repository ericrisco/rsc-harness (58 stars, last pushed 2d ago), licensed MIT. It adds 82 tokens to every session and 2,937 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
shell-scripting
Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.
bash-defensive-patterns
Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.
bash-scripting-safe
Write safe, robust Bash scripts — set -euo pipefail, quoting, word splitting, error handling, idempotency, and common data-loss gotchas.
shell-scripting
Skill "shell-scripting" from chaterm/terminal-skills, covering shell 脚本编写, 概述, 基础语法, 脚本结构 and 脚本描述.
shell-bash
Shell scripting and Bash programming patterns.
shell-scripting-safe
写 shell/bash 脚本时使用。防止静默失败与误删。.