mcpField
B
bash-script-helper

bash-script-helper

github.com/jackspaceDevelopment1638 installsUpdated 12w ago
Repository

About bash-script-helper

A coding skill that guides Bash script writing and debugging with defensive practices, input validation, and shellcheck. It is intended for developers working on Bash scripts.

Key features

  1. 01Bash error handling and safe quoting
  2. 02Argument parsing with getopts
  3. 03File reading and array patterns
  4. 04Cleanup with traps and mktemp
  5. 05Static checks with shellcheck

Use cases

  1. 01Creating scripts with validated parameters
  2. 02Debugging Bash scripts safely

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jackspace/claudeskillz --skill bash-script-helper

After installing, type/bash-script-helperin Claude Code to confirm it loaded.

Bundled filesSKILL.json

Details

From the project README

Bash-script-helper

Instructions

When writing or debugging bash scripts:

  • Always use #!/bin/bash shebang
  • Set -e (exit on error), -u (error on undefined var)
  • Use [[ ]] instead of [ ] for tests
  • Quote variables: "$variable" not $variable
  • Use $() instead of backticks
  • Check command exit codes: $?
  • Use trap for cleanup
  • Provide meaningful error messages
  • Validate input parameters
  • Argument parsing with getopts
  • Reading files line by line
  • Function definitions and calls
  • Arrays and associative arrays
  • Use set -x for trace mode
  • shellcheck for static analysis
  • Use echo/printf for debugging output
  • Avoid eval
  • Sanitize user input
  • Use mktemp for temporary files
  • Set proper file permissions

Examples

Add examples of how to use this skill here.

Notes

  • This skill was auto-generated
  • Edit this file to customize behavior

Comments

Markdown supported