--- name: octivi-bash-boilerplate description: Create, refactor, and migrate Bash scripts with Octivi Bash Boilerplate (OBB) using marker blocks (`# >>> OBB:BEGIN ...` / `# <<< OBB:END`). Use when selecting `header` vs `full` integration, copying ready templates, updating marker blocks, and validating script quality with deterministic checks. --- # Octivi Bash Boilerplate Use this skill for any Bash script task that should follow OBB conventions. ## Inputs Required - Script intent and lifecycle (throwaway helper vs maintained CLI). - CLI contract: required/optional flags, positional args, env vars. - Output contract: stdout/stderr format, exit codes. - Side effects: files, network, permissions, cleanup requirements. If any of these are missing, infer minimally and state assumptions. ## Decision Table Choose exactly one mode per script: | Mode | Use when | Tradeoff | | --------------- | --------------------------------------------------------------- | ----------------------------------------- | | `header` | Small scripts; strict mode + basic constants are enough | Few helpers, more manual utilities | | `full-source` | Medium/large scripts; you can rely on external OBB library path | Cleaner file, external runtime dependency | | `full-embedded` | Medium/large scripts; self-contained delivery required | Bigger file, embedded generated block | ## Execution Steps 1. Read `references/workflow.md` and apply the flow for new/refactor/migration. 2. Copy one ready template to destination: `cp skills/octivi-bash-boilerplate/assets/templates/ ./script.sh`. 3. Implement business logic outside OBB marker blocks. 4. If a marker block is unpopulated or stale, run: `octivi-bash-boilerplate-update