What problem does it solve? Go CLI tools often suffer from inconsistent flag handling, broken configuration layering, logs polluting stdout, and untestable commands. This Skill encodes the conventions used by kubectl, docker, and gh so your CLI behaves correctly under pipes, scripts, and automation from the start. ## Core Features & Use Cases - Command & Flag Structure: Sets up Cobra root commands, subcommands, persistent vs local flags, required flags, mutual exclusion, and argument validators. - Configuration Layering: Wires Viper so values resolve correctly across flags, environment variables, config files, and defaults, with graceful handling of missing config files. - Production Behaviors: Covers ldflags version injection, Unix exit codes, stdout/stderr discipline, signal-based graceful shutdown, shell completions, and programmatic CLI testing. - Use Case: You are scaffolding a new internal deploy tool in Go. Use this Skill to generate the root command with Viper config, a serve subcommand with graceful SIGTERM shutdown, and table-driven tests that capture command output. ## Quick Start Ask the agent to scaffold a Go CLI with Cobra and Viper including a serve subcommand, a version command, and tests for the command output.