원클릭으로
bash-scripting
Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Diagnose a broken/slow/crashlooping app in kubenuc or k8s-vms-daniele — gather evidence via Graylog/Grafana/kubectl before asking the user anything. Triggers on "X is down", "X is crashlooping", "X is erroring", "X is slow", "why did X restart".
Route documentation/notes to the right destination (Confluence, README/CLAUDE.md, Obsidian, or NetBox) based on content type, and confirm the exact destination with the user before writing anything. Also invoke proactively — before opening a PR — when the change is a new operational gotcha, an incident, a security-hardening trade-off, a version-pin rationale, a new app/cluster, or a structural Terraform/infra change, to decide whether README.md, a CLAUDE.md, or Confluence needs updating.
Cluster lifecycle operations — setting up new clusters, kubenuc-test overlay pattern, kustomize patch conventions, and FluxCD bootstrap structure for infra-cd clusters.
Before adding any new Prometheus scrape target or exporter, check the active-series budget in Grafana Cloud and propose write_relabel drops if needed. Triggers on "add a scrape config", "add an exporter", "enable metrics for X", "add a ServiceMonitor". Gates any change that could grow active series count.
Review a Renovate PR before merging — read the changelog, diff values against this repo's overrides, check e2e status, flag major bumps, and produce a merge checklist. Triggers on "review this renovate PR", "should I merge this chart bump", "is this renovate PR safe".
Ansible playbook/role conventions, Molecule testing patterns, and ansible-agent invocation for the infra-cd repository.
| name | bash-scripting |
| description | Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing. |
| category | granular-workflow-bundle |
| risk | safe |
| source | personal |
| date_added | 2026-02-27 |
Specialized workflow for creating robust, production-ready bash scripts with defensive programming patterns, comprehensive error handling, and automated testing.
Use this workflow when:
bash-pro - Professional scriptingbash-defensive-patterns - Defensive patternsUse @bash-pro to design production-ready bash script
bash-pro - Script structurebash-defensive-patterns - Safety patternsUse @bash-defensive-patterns to implement strict mode and error handling
bash-linux - Linux commandslinux-shell-scripting - Shell scriptingUse @bash-linux to implement system commands
bash-defensive-patterns - Error handlingerror-handling-patterns - Error patternsUse @bash-defensive-patterns to add comprehensive error handling
bash-pro - Logging patternsUse @bash-pro to implement structured logging
bats-testing-patterns - Bats testingshellcheck-configuration - ShellCheckUse @bats-testing-patterns to write script tests
Use @shellcheck-configuration to lint bash script
documentation-templates - DocumentationUse @documentation-templates to document bash script
#!/usr/bin/env bash
set -euo pipefail
readonly SCRIPT_NAME=$(basename "$0")
readonly SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*"; }
error() { log "ERROR: $*" >&2; exit 1; }
usage() { cat <<EOF
Usage: $SCRIPT_NAME [OPTIONS]
Options:
-h, --help Show help
-v, --verbose Verbose output
EOF
}
main() {
log "Script started"
# Implementation
log "Script completed"
}
main "$@"
os-scripting - OS scriptinglinux-troubleshooting - Linux troubleshootingcloud-devops - DevOps automation