What problem does it solve?
It helps you design and implement Go command-line tools that behave correctly in automation, including consistent command structure, configuration layering, output discipline, completions, and error/exit-code handling.
Core Features & Use Cases
- Go CLI engineering guidance (Cobra/Viper-first): Covers command trees, persistent vs local flags, flag constraints, and binding flags to configuration via Viper.
- Production-quality UX for shells & scripts: Establishes stdout/stderr separation, machine-readable output patterns, and shell completion setup.
- Reliability under automation: Provides patterns for version injection with ldflags, signal handling with context cancellation, Unix exit code conventions, and CLI testing practices.
Use cases include building a new Go CLI, extending an existing Cobra CLI with subcommands/flags/completions, and reviewing an existing CLI for correctness against common pitfalls.
Quick Start
Use this skill when you are creating a new Go CLI command tree with Cobra and want consistent configuration via Viper, correct stdout/stderr behavior, and proper exit codes under failure conditions.