What problem does it solve?
This Skill prevents Bash CLI bugs where sub-command argument forwarding is accidentally broken, causing user options to be silently ignored.
Core Features & Use Cases
- Deterministic dispatcher pattern: Implements a standardized sub-command dispatcher using cmd separation with
shift and strict "$@" forwarding.
- Fail-fast and validation guardrails: Requires
set -euo pipefail, enforces curl --fail-with-body -sS, and uses unknown-command handling to avoid silent failures.
- Regression and static checks: Includes a dispatch lint script that heuristically flags missing
"$@" in case branches, plus an example regression test strategy.
- Use Case: When maintaining an admin/ops Bash CLI, ensure commands like list-users correctly honor filters such as
--plan free instead of defaulting due to argument loss.
Quick Start
Ask the AI to implement a Bash admin-cli sub-command dispatcher that assigns cmd from the first argument, shifts once, forwards the remaining arguments with "$@" for every case branch, and includes a lint/regression check to ensure options are not silently ignored.