implementing-shell

implementing-shell is a skill for Claude Code from qte77/claude-code-plugins. It costs 43 tokens per session (982 once invoked), scanned C, original, Apache-2.0.

A guide for writing and reviewing Bash shell scripts, including scripts used by hooks, continuous integration, and setup tools. It covers error handling, command-line arguments, exit codes, dependency checks, and ShellCheck.

In plain words
What is it for?
Use it to create or audit Bash scripts, add usage messages, handle missing tools, support dry runs, and keep scripts compatible with ShellCheck.
Why use it?
It helps prevent scripts from silently continuing after failures or giving unclear instructions when used incorrectly. It also identifies when a task has become too complex for shell scripting.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument; mentions Claude Code.

Part of the sh-dev plugin — 2 skills shipped together

Good fit Use it to create or audit Bash scripts, add usage messages, handle missing tools, support dry runs, and keep scripts compatible with ShellCheck.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qte77/claude-code-plugins/implementing-shell
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 qte77/claude-code-plugins --skill implementing-shell
Clone the repo
git clone --depth 1 https://github.com/qte77/claude-code-plugins

Made for: Claude Code.

Or install sh-dev, the plugin that ships this one along with the rest of its 2 skills.

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 implementing-shell

README.md
[![agentmods](https://agentmods.dev/badge/skills/qte77/claude-code-plugins/implementing-shell/github.svg)](https://agentmods.dev/skills/qte77/claude-code-plugins/implementing-shell)
Your own site
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/implementing-shell"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/implementing-shell/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 implementing-shell

Your own site · 80×15
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/implementing-shell"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/implementing-shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 982 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.00043 $0.00982
Opus 5.5 $0.00017 $0.00393
Sonnet 5.5 $0.00009 $0.00196
Haiku 4.5 $0.00004 $0.00098

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

Security

Grade C, and why

implementing-shell 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 8d 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.

| Temp files | `tmp=$(mktemp -d)` plus `trap 'rm -rf "$tmp"' EXIT` |
plugins/sh-dev/skills/implementing-shell/SKILL.md · 97 lines

How it starts

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

Implementing Shell Scripts

Target: $ARGUMENTS

Writes or reviews Bash scripts so they fail loudly, explain their usage, and pass ShellCheck. Test them with testing-shell (BATS).

When to Use

  • New or changed *.sh: hooks, CI helpers, install/setup scripts, GitHub Action scripts
  • Reviewing a script that silently continues after errors or has no usage message

Do Not Use

  • Logic that has outgrown shell (data structures, JSON transforms beyond jq, >~200 lines) — move it to Python or another real language instead of hardening the script

Conventions

Topic Rule
Shebang #!/usr/bin/env bash (or sh only when POSIX-portable and tested with dash)
Strict mode set -euo pipefail for scripts that must stop on errors. Hooks that must never break the host tool use set -u and handle failures explicitly instead
Quoting Quote every expansion: "$var", "$@", "$(cmd)"
Usage usage() prints to stderr; -h/--help exits 0, a usage error exits 2
Exit codes 0 success · 1 runtime failure · 2 usage error; document any others in usage()
Dependencies Check with command -v tool >/dev/null up front and say which tool is missing
Side effects Honour DRY_RUN=1: print what would change, change nothing
Temp files tmp=$(mktemp -d) plus trap 'rm -rf "$tmp"' EXIT
Output Data to stdout, diagnostics to stderr, so callers can pipe the result
Untrusted input Never eval; pass values as arguments, not interpolated into command strings

Skeleton

#!/usr/bin/env bash
# do-thing.sh — one line on what it does.
set -euo pipefail

usage() {
  cat >&2 <<'EOF'
Usage: do-thing.sh [--out FILE] TARGET
  --out FILE  write the report to FILE (default: stdout)
Env: DRY_RUN=1 prints actions without performing them.
EOF
}

die() { echo "error: $*" >&2; exit 1; }

out=""
while [ $# -gt 0 ]; do
  case "$1" in
    -h|--help) usage; exit 0 ;;
    --out) [ $# -ge 2 ] || { usage; exit 2; }; out="$2"; shift 2 ;;
    --) shift; break ;;
    -*) usage; exit 2 ;;
    *) break ;;
  esac
done
[ $# -eq 1 ] || { usage; exit 2; }
target="$1"

command -v jq >/dev/null 2>&1 || die "jq is required"

run() { if [ "${DRY_RUN:-0}" = "1" ]; then echo "DRY_RUN: $*" >&2; else "$@"; fi; }

write_report() { printf 'processed %s\n' "$target" > "$1"; }

if [ -n "$out" ]; then run write_report "$out"; else echo "processed $target"; fi

Read the full file on GitHub · 97 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. 8d ago Changed 5101fbddf9b5
  2. 28d ago First seen · 97 lines · 43 tokens per session scan C f8ab463bc6b8

Subscribe to this mod's changes

implementing-shell is a skill published in the GitHub repository qte77/claude-code-plugins (3 stars, last pushed today), licensed Apache-2.0. It adds 43 tokens to every session and 982 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-11-02.

Related

implementing-shell compared with skills from other repositories

implementing-shell next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
implementing-shellqte77/claude-code-pluginsSkill3todayApache-2.0C43Claude Code
android-kotlin-composeand3r817/dot-claude-pluginsSkill22mo agoMITA84Claude Code
android-kotlin-coroutinesand3r817/dot-claude-pluginsSkill22mo agoMITA87Claude Code
dotnet-testNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A35Claude Code
dotnet-analyzersNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A45Claude Code
dotnet-dependencyNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A35Claude Code
dotnet-inspectNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A54Claude Code