From forge-core
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 claudepluginhub n4m3z/forge-core**/*.sh**/MakefileThis skill uses the workspace's default tool permissions.
macOS ships BSD tools — `shasum -a 256` not `sha256sum`, BSD awk lacks 3-arg `match()`.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Processes PDFs: extracts text/tables/images, merges/splits/rotates pages, adds watermarks, creates/fills forms, encrypts/decrypts, OCRs scans. Activates on PDF mentions or output requests.
Share bugs, ideas, or general feedback.
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