What problem does it solve?
This Skill helps you design, extend, and review Go command-line applications built with spf13/cobra so command behavior is predictable, testable, and easy to maintain.
Core Features & Use Cases
- Command Tree Design: Structure root commands, subcommands, and grouped help output with the right registration order.
- Validation and Execution Flow: Choose RunE, args validators, and hook placement correctly so errors propagate cleanly and setup happens before execution.
- Flags, Completions, and Testing: Apply persistent versus local flags, flag constraints, shell completion hooks, and output-capturable testing patterns.
- Use Case: A Go API team can use this Skill to build a production CLI for deployment, migration, or admin tasks without common cobra mistakes such as manual arg checks, brittle stdout writes, or leaked flag state across tests.
Quick Start
Ask the assistant to review or implement your Go cobra command using the recommended RunE, args validation, flag, completion, and testing patterns.