configs/skills/bash-expert/SKILL.md
Expert Bash help for writing, debugging, and optimizing safe, portable shell one-liners and scripts on macOS/Linux. Use when users ask for Bash or POSIX sh commands, script reviews, ShellCheck fixes, quoting/pipeline issues, process/file automation, or converting requirements into shell scripts.
npx skillsauth add heyayushh/stacc bash-expertInstall 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.
/usr/bin/env bash for Bash 4+, /bin/sh for POSIX-only requirements.set -euo pipefail
IFS=$'\n\t'
shopt -s nullglob
Avoid strict mode when partial failures are expected."${var}"), prefer printf over echo, and avoid word-splitting in loops.find, grep, sed, awk, jq, tar, rsync, etc.) and portability constraints.#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
trap 'cleanup' EXIT
cleanup(){ :; }
log(){ printf '%s\n' "$*" >&2; }
die(){ log "error: $*"; exit 1; }
getopts), sanity checks, and dry-run mode before mutating data.while IFS= read -r line; do ...; done < file) and null-delimited traversal (find ... -print0 | while IFS= read -r -d '' path; do ...; done).bash -n, shellcheck -x), run with representative inputs, then present final command plus usage notes/rollback guidance.set -o pipefail or bash -o pipefail -c 'cmd'.diff <(cmd1) <(cmd2).xargs -0 -r with find -print0; avoid for f in $(...).LC_ALL=C for deterministic greps/sorts; specify PATH explicitly for cron/CI runs.[[ ]], brace expansion, ** globstar. Offer POSIX alternatives when /bin/sh is requested.sed -E vs -r, date vs gdate, stat vs gstat; note fallbacks for macOS.awk/perl instead of large Bash loops.set -x (or bash -x script.sh); use PS4='+ ${BASH_SOURCE}:${LINENO}: ' for context.shellcheck script.sh for linting; address quoting and word-splitting warnings first.printf '%s\n' "msg: $var"; disable tracing after debug.See references/bash_patterns.md for ready-to-use snippets: script skeletons, getopts template, safe find/xargs, mktemp + traps, heredocs, array handling, and bats test scaffolding. Load it only when deeper examples are needed.
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
development
Refactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage. Use when asked to clean up a SwiftUI view’s layout/ordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.
development
Best practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.
development
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is insufficient.