language-bash

language-bash is a skill for Claude Code, Codex from lugassawan/swe-workbench. It costs 60 tokens per session (1,809 once invoked), scanned A, original, MIT.

Bash idioms — strict mode, parameter expansion, arrays, trap cleanup, heredocs, and POSIX portability. Auto-load when working with .sh, .bash files, or when the user mentions bash, shell, shellcheck, set -e, or pipefail.

Skill for Claude CodeCodex

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/lugassawan/swe-workbench/language-bash
Any agent
npx skills add lugassawan/swe-workbench --skill language-bash
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

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 language-bash

README.md
[![agentmods](https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-bash.svg)](https://agentmods.dev/skills/lugassawan/swe-workbench/language-bash)
Your own site
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/language-bash"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-bash.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00060 $0.01809
Opus 5 $0.00030 $0.00905
Sonnet 5 $0.00012 $0.00362
Haiku 4.5 $0.00006 $0.00181

Measured today against content hash 932a1297a598, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

language-bash scanned grade A with 0 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 today.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/language-bash/SKILL.md · 138 lines

How it starts

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

Bash

Strict mode

set -euo pipefail
IFS=$'\n\t'
  • -e is suppressed in conditional contexts (||, &&, if, !); explicit subshells (...) do inherit it — use || true to absorb expected failures.
  • -u treats unset variables as errors; unset arrays trigger it: declare before use (arr=()) or guard with ${arr[@]+"${arr[@]}"} for optional arrays.
  • IFS=$'\n\t' prevents accidental word-splitting on spaces in for loops and command substitution.

Quoting and tests

  • Always "$var" — bare $var triggers word splitting and glob expansion.
  • 'literal' for fixed strings with no expansion needed.
  • Prefer [[ ]] over [ ]: supports =~ regex, no word splitting, lexical string comparison.
  • $() over backticks: nestable, readable, no escaping required.
if [[ "$filename" =~ \.(sh|bash)$ ]]; then
  shellcheck "$filename"
fi

Parameter expansion

  • ${var:-default} — substitute default if unset or empty.
  • ${var:?error msg} — abort with message if unset; pairs well with set -u.
  • ${var%suffix} — strip shortest suffix match (e.g. strip extension).
  • ${var//pattern/repl} — replace all occurrences in-place.

Arrays and word splitting

files=(src/a.sh "src/b script.sh" src/c.sh)
for f in "${files[@]}"; do   # each element quoted separately
  process "$f"
done
  • "${arr[@]}" — each element as a separate quoted word; always use for iteration.
  • "${arr[*]}" — all elements joined by IFS[0]; use only for joining to a string.
  • Never for x in $(cmd) — use mapfile -t arr < <(cmd) or while IFS= read -r line.

Pipelines and subshells

  • pipefail makes a pipeline fail when any stage fails, not just the last.
  • Command substitution $(...) runs in a subshell; variable assignments inside don't leak out.
  • cmd || true absorbs an expected non-zero exit under -e; cmd 2>/dev/null suppresses stderr noise separately.
  • Background jobs: proc &; always wait "$pid" before consuming results.
  • Redirect ordering matters: cmd >/dev/null 2>&1 silences all; cmd 2>&1 >/dev/null silences stdout only (stderr still shows — order determines what 2>&1 copies).

Read the full file on GitHub · 138 lines

Files

What ships with it

1 file 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. today First seen · 138 lines · 60 tokens per session scan A 932a1297a598

Subscribe to this mod's changes

language-bash is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 1,809 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.