coding-guidance-bash — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited coding-guidance-bash (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill adds portable Bash implementation, refactoring, and review guidance.
This skill provides portable Bash engineering principles. Compose with:
security (threat modeling)
project-platform-diagnose (environment-sensitive diagnosis)
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)
another language with stronger structure
editing.
environment assumptions. Ask only when multiple plausible script behaviors would change semantics.
dependencies, filesystem effects, and external tool requirements should be explicit.
functions for meaningful substeps, and cleanup traps for temporary state.
reproducible validation path you can run directly.
supports.
Use this instead of the default implementation workflow when the task is primarily cleanup or restructuring:
dependencies, and failure modes.
tangled control flow one step at a time.
characterization coverage first when behavior is unclear.
debug.
When reviewing (not implementing), skip the implementation workflow and use this instead:
Critical > Important >Suggestion.
masking of failing commands, trap and cleanup bugs, unsafe temp-file handling, destructive command risks, portability mismatches, environment assumptions, and missing tests.
#!/usr/bin/env bash unless the repo hasa stricter shebang convention
set -Eeuo pipefail unless the script has a documented reason to managefailures differently; scope exceptions narrowly
"$var", "${arr[@]}", and "$(cmd)"concatenation
script safely
command substitutions without understanding how failures propagate
trap when the script allocatesthem
$IFS, globs, current working directory, and environment variables asboundary conditions, not stable ambient assumptions
readable
local inside functions unless a variable is intentionally shared[[ ... ]] for Bash conditionals and case for multi-branch stringmatching
printf over echo when escaping, flags, or portability ambiguitymatter
$() instead of backticksunreadable quickly when names get vague
documented exception
shopt -s inherit_errexit when the Bash version and repo contractallow it and command-substitution failures must propagate cleanly
: "${VAR:?message}"command -v tool >/dev/null 2>&1mktemp for temp files and directories; never hand-roll temp paths inshared locations
operations
trap for cleanup and, when helpful, targeted ERR reporting with lineor function context
evalor re-parsed strings
eval unless the script is explicitly a shell metaprogramming tool andthe risk is justified
operations
codes as part of the contract
cd; either scope it to a subshell or restore the priordirectory clearly
-- when forwarding user arguments to externalcommands
aggregate wait results deliberately, and forward or handle termination signals rather than abandoning children
locking, isolation, or idempotency rule up front
strategy such as flock or a documented equivalent instead of hoping paths or timing stay unique
--help or usage text for non-trivial scriptsnear the top of the file
to parse it
explicitly best-effort
automation
while IFS= read -r line; do ...; done over loops that split onwhitespace implicitly
find, git, or similar tools:-print0, xargs -0, or read -r -d ''
readarray or mapfile when populating arrays from command output inBash-specific scripts
for f in $(...) for filenames or untrusted data; it is usually a bugthey make the script clearer and safer
differences before adding flags with inconsistent behavior
temp locations or duplicated wrappers
language when shell stops being the clearest tool
does not already prescribe a short-only style
starts owning parsing, validation, execution, and reporting all at once
shellcheck and shfmt where the repo uses themscripts
them
Use these when the right choice is not obvious:
or large in-memory transforms, shell may be the wrong tool.
switch to arrays or redesign the interface before adding more flags.
set -e behavior is unclear in a construct, makethe check explicit rather than assuming the shell will fail the right way.
cleans up, and reports failures before adding more parallelism.
feature, or OS-specific tools, document and validate that boundary instead of hiding it.
strict mode, shellcheck, shfmt, or helper libraries, follow them unless they create a correctness or safety problem.
problem. When narrowness conflicts with correctness or safety, prefer correctness. When it conflicts with style alone, prefer narrowness unless the task is explicitly a cleanup.
adjacent issue while you are in the file.
parsing pain is a pattern; before extracting, check whether a function, a helper script, or a small move to another language is the simpler move.
jq, awk, sed, orplatform-specific tooling, treat that dependency as part of the user-facing contract.
A change is done when:
--help, argument parsing, or top-level script startup paths aresmoke-tested before deeper functional validation
out with a concrete reason
--help or a minimalfixture invocation
fixture rather than assumed correct
remaining platform risk was called out explicitly
Critical and Important severity are addressedReview this Bash deploy script for quoting, traps, and rollback safetyRefactor this repo automation script to use arrays, safe temp files, and better argument parsing~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.