Loading...
Loading...
Shell scripting best practices for writing safe, portable, and maintainable bash/sh scripts (formerly shell-scripts). Use when writing, reviewing, or refactoring shell scripts. Triggers on shell scripts, bash, sh, POSIX, ShellCheck, error handling, quoting, variables.
npx skill4agent add pproenca/dot-skills shell| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Safety & Security | CRITICAL | | 6 |
| 2 | Portability | CRITICAL | | 5 |
| 3 | Error Handling | HIGH | | 6 |
| 4 | Variables & Data | HIGH | | 5 |
| 5 | Quoting & Expansion | MEDIUM-HIGH | | 6 |
| 6 | Functions & Structure | MEDIUM | | 5 |
| 7 | Testing & Conditionals | MEDIUM | | 5 |
| 8 | Performance | LOW-MEDIUM | | 6 |
| 9 | Style & Formatting | LOW | | 4 |
safety-command-injectionsafety-eval-avoidancesafety-absolute-pathssafety-temp-filessafety-suid-forbiddensafety-argument-injectionport-shebang-selectionport-avoid-bashismsport-printf-over-echoport-export-syntaxport-test-portabilityerr-strict-modeerr-exit-codeserr-trap-cleanuperr-stderr-messageserr-pipefailerr-check-commandsvar-use-arraysvar-local-scopevar-naming-conventionsvar-readonly-constantsvar-default-valuesquote-always-quote-variablesquote-dollar-atquote-command-substitutionquote-brace-expansionquote-here-documentsquote-glob-safetyfunc-main-patternfunc-single-purposefunc-return-valuesfunc-documentationfunc-avoid-aliasestest-double-bracketstest-arithmetictest-explicit-emptytest-file-operatorstest-case-patternsperf-builtins-over-externalperf-avoid-subshellsperf-process-substitutionperf-read-filesperf-parameter-expansionperf-batch-operationsstyle-indentationstyle-file-structurestyle-commentsstyle-shellcheck| File | Description |
|---|---|
| AGENTS.md | Complete compiled guide with all rules |
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |