write-bash-scripts

write-bash-scripts is a skill for Claude Code from cboone/agent-harness-plugins. It costs 51 tokens per session (566 once invoked), scanned A, original, MIT.

A Bash style guide for creating, editing, and reviewing shell scripts.

In plain words
What is it for?
Use it when writing or reviewing Bash scripts, including scripts with functions, arrays, command substitution, and automated validation.
Why use it?
It promotes consistent script structure, quoting, variable handling, error checks, and safer command execution.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the write-bash-scripts plugin — 1 skill shipped together

Good fit Use it when writing or reviewing Bash scripts, including scripts with functions, arrays, command substitution, and automated validation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cboone/agent-harness-plugins/write-bash-scripts
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 cboone/agent-harness-plugins --skill write-bash-scripts
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code.

Or install write-bash-scripts, the plugin that ships this one along with the rest of its 1 skill.

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 write-bash-scripts

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-bash-scripts/github.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/write-bash-scripts)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-bash-scripts"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-bash-scripts/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 write-bash-scripts

Your own site · 80×15
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-bash-scripts"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-bash-scripts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 566 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00051 $0.00566
Opus 5.5 $0.00020 $0.00226
Sonnet 5.5 $0.00010 $0.00113
Haiku 4.5 $0.00005 $0.00057

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

Security

Grade A, and why

write-bash-scripts 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 1mo 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.

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.

plugins/write-bash-scripts/skills/write-bash-scripts/SKILL.md · 59 lines

How it starts

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

Bash Style Guide

Apply the Bash conventions from ./references/BASH.md when creating or editing Bash scripts.

Key Conventions

Read ./references/BASH.md for the complete guide. Summary:

Script Structure

  • Shebang: #!/usr/bin/env bash
  • Strict mode: set -euo pipefail
  • Main function called at end: main "$@"

Naming

  • Functions: snake_case
  • Local variables: lower_case
  • Constants: ALL_CAPS with readonly

Syntax

  • Variable expansion: ${var} not $var, except the argument lists "$@" and "$*", which stay unbraced
  • Command substitution: $(...) not backticks
  • Tests: [[...]] not [...]
  • Function syntax: function name() { } with both keyword and parentheses

Quoting

  • Always quote variable expansions: "${var}"
  • Always quote command substitutions: "$(cmd)"
  • Use arrays for lists, not word splitting
  • Guard an array that can be empty: ${array[@]+"${array[@]}"}

Local Variables

  • Declare with local
  • Separate declaration from command substitution to preserve exit codes

Bash 3.2 (macOS)

macOS ships bash 3.2 as /bin/bash, which is what #!/usr/bin/env bash finds on a stock Mac. Under set -u it exits on an empty "${@}" or "${array[@]}", and it has no associative arrays, readarray or mapfile, ${var,,} or ${var^^}, or namerefs. See "Bash 3.2 (macOS)" in ./references/BASH.md for replacements.

Pull Request Review

When reviewing a pull request, apply ./references/review-checklist.md: the rules of this guide that a reviewer can check in a diff, ranked as Important, Nits and Do not flag. The same checklist is installed into repositories for automated reviewers, so update it whenever a rule here changes.

Validation

Whenever possible, validate the script before finishing. Prefer using a project-specific validation script, if available. Common locations include declarations in package.json and scripts stored in bin/. If those aren't present, shellcheck is a commonly available linter for Bash scripts.

Read the full file on GitHub · 59 lines

Files

What ships with it

2 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. 1mo ago Changed · +1 lines · +19 tokens per session 976ba6e38a6d
  2. 2mo ago Changed · +4 lines 720f9e8f16bb
  3. 2mo ago Changed · -1 lines · -20 tokens per session b0533d82f376
  4. 2mo ago Changed · +5 lines 9e0498577498
  5. 2mo ago First seen · 50 lines · 52 tokens per session scan A 49d54f7a2999

Subscribe to this mod's changes

write-bash-scripts is a skill published in the GitHub repository cboone/agent-harness-plugins (3 stars, last pushed 5d ago), licensed MIT. It adds 51 tokens to every session and 566 once invoked, about $0.0002 per session on Opus 5.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.

Related

write-bash-scripts compared with skills from other repositories

write-bash-scripts next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
write-bash-scriptscboone/agent-harness-pluginsSkill35d agoMITA51Claude Code
optimize-python-parallelismcloudguo123/atomlaneSkill1todayMPL-2.0A70Codex
mainframe-rustCATWILLgh/MAINFRAMESkill213d agoMITA38Claude Code, Codex
golang-error-handlingsamber/cc-skills-golangSkill4.0k22d agoMITA144Claude Code
python-lspoaustegard/claude-skillsSkill423todayMITA155Claude Code
call-diagnosticssonichi/sutandoSkill413todayMITA0Claude Code, Codex
extending-personhog-test-harnessPostHog/posthogSkill41ktodaynoneA134Claude Code, Codex