← ClaudeAtlas

bash-scriptlisted

Generates production Bash scripts with a visual timeline UI, state-based interactive prompts, and strict error handling. Use when asked to write a bash script, create a shell script, or build a DevOps or CLI script with framed terminal output.
erclx/toolkit · ★ 1 · AI & Automation · score 74
Install: claude install-skill erclx/toolkit
# Bash script Generate production-ready Bash scripts for DevOps and CLI workflows. Enforce strict formatting with a visual timeline UI and state-based interactivity. Load `references/patterns.md` for the timeline lifecycle, logging, interactive prompt, help-screen, and full-script code templates. Copy those definitions verbatim, keeping only the colors and functions the script actually uses. ## Script setup - Start with `#!/usr/bin/env bash`, `set -e`, and `set -o pipefail`. - Bash 4+ features (namerefs, associative arrays) are allowed. - Implement a visual help screen via `show_help` if the script accepts arguments. - Do not rely on unset variables. Use `${VAR:-default}`. ## Visual timeline - Maintain a vertical timeline (`│`) from `┌` to `└` throughout all output. - Write all frame output (`┌`, `│`, `├`, `└`, log lines, prompts) to stderr via `>&2`. Write data (JSON, lists, piped values) to stdout. `--help` is the exception and prints to stdout. - Open the timeline once at the start of `main()` via `open_timeline "Title"`, before any logic, prompts, or checks. - Close the timeline via `trap close_timeline EXIT`, registered immediately after `open_timeline`. - On success, disable with `trap - EXIT`, then print `└\n` and the success message manually. - On cancellation and error, never print `└` manually. The trap owns those exits. - Use state transitions for interactive prompts: `◆` active, `◇` inactive. - Do not add diamonds (`◆` or `◇`) to non-interactive log function