coding-guidance-bash

Guidance for writing and reviewing Bash scripts, the command-line programs commonly used for automation and repository tasks. It focuses on safe quoting, clear failure handling, process ownership, and maintainable script boundaries.

In plain words
What is it for?
Use it when implementing, refactoring, or reviewing Bash automation and repository scripts. It covers strict-mode edge cases, cleanup, concurrent processes, filesystem safety, and portable command construction.
Why use it?
It helps prevent scripts from mishandling filenames, hiding errors, or leaving background processes and temporary resources behind. It also clarifies when other guidance is more appropriate.

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/n-n-code/n-n-code-skills/coding-guidance-bash
Any agent
npx skills add n-n-code/n-n-code-skills --skill coding-guidance-bash
Clone the repo
git clone --depth 1 https://github.com/n-n-code/n-n-code-skills

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00062 $0.02060
Opus 5 $0.00031 $0.01030
Sonnet 5 $0.00012 $0.00412
Haiku 4.5 $0.00006 $0.00206

Measured 2d ago against content hash fca782c53c1c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coding-guidance-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 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.

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.

.agents/skills/coding-guidance-bash/SKILL.md · 210 lines

How it starts

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

Bash Coding Guidance

This skill adds portable Bash implementation, refactoring, and review guidance.

Adjacent Skills

This skill provides portable Bash engineering principles. Compose with:

  • Workflow: thinking (ambiguous decision framing), recursive-thinking (stress-testing), security (threat modeling)
  • Domain overlays: project-core-dev (repo-specific completion discovery and reporting when needed), project-platform-diagnose (environment-sensitive diagnosis), project-release-maintainer (release or packaging workflows that happen to use Bash)

Reference Map

Load references only when the task needs that depth:

When Not to Lean on This Skill

  • non-shell work
  • POSIX sh portability work where Bash-only features are not allowed (adapt the guidance to the repo's POSIX-shell contract instead of importing Bash-only defaults)
  • large data processing jobs that should realistically move to Python, awk, or another language with stronger structure
  • broader release, packaging, or publishing workflow design that only happens to call Bash; use project-release-maintainer first

Implementation Workflow

  1. Read the touched scripts, entrypoints, call sites, and nearby docs before editing.
  2. Infer the intended contract from current usage text, flags, tests, and environment assumptions. Ask only when multiple plausible script behaviors would change semantics.
  3. Keep the contract narrow: inputs, outputs, exit codes, environment dependencies, filesystem effects, and external tool requirements should be explicit.
  4. Implement with deliberate failure handling, safe quoting, arrays for argv construction, functions for meaningful substeps, and cleanup traps for temporary state.
  5. Add or update shell tests when the repo has them; otherwise add the smallest reproducible validation path you can run directly.
  6. Run the narrowest relevant formatter, linter, and script tests the repo supports.

Read the full file on GitHub · 210 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. 2d ago First seen · 210 lines · 62 tokens per session scan A fca782c53c1c

Subscribe to this mod's changes

coding-guidance-bash is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 4d ago), licensed MIT. It adds 62 tokens to every session and 2,060 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-08-31.

Related

Other skills, from other repositories

link-ticket-to-session

Link the current Claude Code session to a ticket (Linear, Jira, GitHub Issues, or GitHub Pull Requests) and cache its title/status in karma. Use when the user explicitly asks to link, attach, associate, or connect this session to a ticket, issue, or PR — e.g. "/link-ticket-to-session ABC-123", "link this session to…

JayantDevkar/claude-code-karma · 91 tokens

laundering

Use when all territories report completion after the hit — handles integration, verification, consigliere final review, cleanup, and ledger updates to produce clean production-ready code.

kucherenko/gangsta · 35 tokens

reconnaissance

Use when beginning a new heist — deploys associates to survey the target codebase, existing tests, dependencies, documentation, and the ledger to produce a reconnaissance dossier for the don's review.

kucherenko/gangsta · 43 tokens

the-grilling

Use when adversarial brainstorming is needed after reconnaissance — the Proposer, Devils-Advocate, and Synthesizer each run ONE pass (no rounds); the Don is grilled on the IDEA first, one question at a time, then the proposal is attacked.

kucherenko/gangsta · 55 tokens

using-gangsta

Use when starting any conversation — establishes how to find and use Gangsta skills, enforces the 1% invocation rule, maps platform tools, and routes the Don's intent through the Gangsta Agents Family hierarchy.

kucherenko/gangsta · 47 tokens

drill-tdd

Use when implementing any feature or bugfix — enforces the Red-Green-Refactor drill with no production code allowed without a failing test first.

kucherenko/gangsta · 34 tokens