Shell scripting best practices for writing safe, portable, and maintainable bash/sh scripts. Use when writing, reviewing, or refactoring shell scripts,…
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
don't have the plugin yet? install it then click "run inline in claude" again.