skills/BashConventions/SKILL.md
Bash and shell scripting pitfalls — BSD vs GNU tools, set -euo pipefail traps, glob behavior, subprocess env. USE WHEN writing or reviewing shell scripts (.sh files), Makefiles with shell recipes, or install scripts.
npx skillsauth add n4m3z/forge-core BashConventionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
macOS ships BSD tools — shasum -a 256 not sha256sum, BSD awk lacks 3-arg match().
grep with 0 matches → exit 1. Fix: grep ... || true((VAR++)) with VAR=0 → exit 1. Fix: VAR=$((VAR + 1))[ cond ] && action where cond is false → exit 1. Fix: if [ cond ]; then action; fifind | while read runs loop in subshell. Fix: while read; done < <(find ...)printf '---\n...' fails — printf parses --- as flags. Use heredoc or printf '%s\n' '---'.
cp -r dir/* skips dotfiles — the * glob doesn't match hidden files. Use cp -r dir/. (trailing /.) when destination must include hidden files. Common silent bug: install scripts that drop .manifest, .env, .provenance/ etc. without error.
Python subprocesses inherit proxy env vars even after unset in the parent bash shell. When calling Python scripts that make HTTP requests from bash, use env -u http_proxy -u https_proxy python3 script.py, or add urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler({}))) at the top of the Python script.
@BashPatterns.md
development
Reactive correction and root-cause fix. USE WHEN something went wrong, user is frustrated, demands a correction, says wtf, what the hell, why did you, that's wrong, this is broken, no not that, stop. Executes the immediate fix, then hunts the upstream artifact that caused it and creates a corrective change.
development
Decompose a research question into sub-queries, spawn parallel WebResearcher agents per angle, synthesize findings with citations and explicit confidence. USE WHEN the user asks to research, investigate, look online, look up, dig into, find sources, gather evidence, or survey what's known about a topic. Single-pass; for multi-round adversarial research use ResearchCouncil in forge-council.
tools
Author project documentation that future humans (and AI sessions) actually read. Covers TLDRs for tools, READMEs, runbooks, journals. USE WHEN write documentation, create tldr, tool one-pager, document a cli, write readme, runbook, journal entry, capture knowledge about a tool, distill a session into reusable notes.
development
Review your own staged changes via a code-review TUI before triggering a commit. USE WHEN about to commit, walking through your own staged diff, self-reviewing before approval, tuicr, revdiff, git diff cached.