This skill provides specialized guidance for developing high-quality command-line tools in Go, ranging from simple single-command utilities to complex, multi-level CLI applications. It features a comprehensive decision framework for choosing between the Go standard library and the Cobra/Viper ecosystem, alongside implementation patterns for POSIX-compliant flags, nested subcommands, and sophisticated configuration management. By emphasizing predictable UX, graceful signal handling, and standardized exit codes, this skill helps developers create Go CLIs that are composable, maintainable, and script-friendly.
Key Features
01Graceful shutdown patterns with signal handling and context
020 GitHub stars
03Configuration precedence management (Flags > Env > Config File)
04Nested subcommand project structures for complex CLI tools
05Standardized exit codes and machine-readable output formats
06Decision framework for stdlib flag vs. Cobra/Viper