Skip to content

Shell scripting guide of 49 rules for safe, portable, and maintainable bash and POSIX sh scripts.

CCM score
49 of 100
skills.sh installs
718
GitHub stars
228
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers nine prioritized categories, from safety and portability down to style, with rule files and examples
  • Includes 49 rules, each with incorrect-versus-correct code comparisons and impact notes, such as safety-command-injection and err-strict-mode
  • Enforces guardrails like quoting variables, avoiding eval, using set -euo pipefail, and running ShellCheck
  • Designed for agents writing, reviewing, or refactoring scripts, Dockerfile RUN commands, Makefiles, CI jobs, cron, and systemd units

Install

$ npx -y skills add pproenca/dot-skills --skill shell -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Shell Scripts Best Practices (Community)

Comprehensive best practices guide for shell scripting, designed for AI agents and LLMs. Contains 49 rules across 9 categories, prioritized by impact from critical (safety, portability) to incremental (style). Each rule includes detailed explanations, real-world examples comparing incorrect vs. correct implementations, and specific impact metrics.

When to Apply

Reference these guidelines when:

  • Writing new bash or POSIX shell scripts
  • Reviewing shell scripts for security vulnerabilities
  • Debugging scripts that fail silently or behave unexpectedly
  • Porting scripts between Linux, macOS, and containers
  • Optimizing shell script performance
  • Setting up CI/CD pipelines with shell scripts

Rule Categories by Priority

Details

Repository
github.com/pproenca/dot-skills
Categories
CLI & Terminal, DevOps & Cloud
First seen
Jun 3, 2026

More from pproenca/dot-skills

All 100

Similar to Shell

More CLI & Terminal