Engineering
bash avatar

bash

Production-grade Bash scripting assistant enforcing safety, maintainability, and ShellCheck compliance. Includes automated headers, pattern enforcement, and risk-aware file modification checkpoints.

Introduction

The Bash scripting skill provides an expert environment for developing production-quality shell scripts that prioritize safety, readability, and reliability. Designed for Bash 4.0+ environments, this skill ensures that all scripts adhere to modern idiomatic practices, preventing common pitfalls that lead to silent failures or data corruption. It acts as a proactive guardian during development, mandating safety headers and strict verification protocols before any write or edit operation on .sh files or system hooks.

  • Automated injection of standard safety headers including set -euo pipefail to ensure robust error handling and undefined variable protection.

  • Enforcement of ShellCheck compliance to eliminate syntax errors, security vulnerabilities, and deprecated patterns.

  • Implementation of modern syntax standards such as the use of [[ ]] for conditionals, quoted variables for whitespace handling, and standard command substitution.

  • Proactive safety checkpoints that block potentially dangerous file modifications unless the skill is active, ensuring all script edits undergo rigorous review.

  • Integrated helper functions for logging, cleanup, validation, and complex argument parsing (getopts).

  • Best for: Quick automation tasks, build/deployment scripts, system administration glue code, and pre-commit hook development.

  • Workflow: Always verify scripts with the ShellCheck tool. If your script grows beyond 200 lines, the skill assists in evaluating if migration to a more robust language like Python or Go is necessary.

  • Constraints: Strictly requires ShellCheck installed via Homebrew. Avoid using this skill for complex business logic, long-running services, or systems requiring intricate unit testing frameworks.

  • Inputs/Outputs: Processes shell script file content, evaluates syntax, refines logic for production readiness, and provides guidance on advanced patterns including trap signals and exit codes.

Repository Stats

Stars
11
Forks
1
Open Issues
0
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 09:00 PM
View on GitHub