bash-patterns

Community

Write robust shell scripts.

Authorflatrick
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides best practices and reusable patterns for writing safe, portable, and maintainable Bash/shell scripts, reducing bugs and security vulnerabilities.

Core Features & Use Cases

  • Script Hardening: Implement safety headers (set -euo pipefail) and safe temporary file handling (mktemp, trap).
  • Argument Parsing: Use getopts for robust command-line argument handling.
  • Testing: Integrate with bats-core for automated testing of shell scripts.
  • Cross-Platform Compatibility: Address differences between macOS (BSD) and Linux (GNU) tools.
  • Use Case: When developing a new deployment script for a CI/CD pipeline, use these patterns to ensure it's secure, handles errors gracefully, and works across different environments.

Quick Start

Use the bash-patterns skill to generate a new, robust bash script template.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bash-patterns
Download link: https://github.com/flatrick/mdt/archive/main.zip#bash-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.