$npx -y skills add jackspace/ClaudeSkillz --skill bash-script-helperExpert helper for bash scripting, debugging, and best practices
| 1 | # Bash-script-helper |
| 2 | |
| 3 | ## Instructions |
| 4 | |
| 5 | When writing or debugging bash scripts: |
| 6 | - Always use #!/bin/bash shebang |
| 7 | - Set -e (exit on error), -u (error on undefined var) |
| 8 | - Use [[ ]] instead of [ ] for tests |
| 9 | - Quote variables: "$variable" not $variable |
| 10 | - Use $() instead of backticks |
| 11 | - Check command exit codes: $? |
| 12 | - Use trap for cleanup |
| 13 | - Provide meaningful error messages |
| 14 | - Validate input parameters |
| 15 | - Argument parsing with getopts |
| 16 | - Reading files line by line |
| 17 | - Function definitions and calls |
| 18 | - Arrays and associative arrays |
| 19 | - Use set -x for trace mode |
| 20 | - shellcheck for static analysis |
| 21 | - Use echo/printf for debugging output |
| 22 | - Avoid eval |
| 23 | - Sanitize user input |
| 24 | - Use mktemp for temporary files |
| 25 | - Set proper file permissions |
| 26 | |
| 27 | |
| 28 | ## Examples |
| 29 | |
| 30 | Add examples of how to use this skill here. |
| 31 | |
| 32 | ## Notes |
| 33 | |
| 34 | - This skill was auto-generated |
| 35 | - Edit this file to customize behavior |