@samber/golang-spf13-cobra

Golang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage/help template customization, man-page and markdown doc generation, and testing with SetArgs/SetOut/SetErr. Apply when using or adopting spf13/cobra, or when the codebase imports `github.com/spf13/cobra`. For configuration layering alongside cobra, see the `samber/cc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I/O patterns), see `samber/cc-skills-golang@golang-cli`.

View in AI SkillSafe app
1 scan finding
30847 downloads
0 stars
0 demos
SKILL.md

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@samber/golang-spf13-cobra/verified)](https://skillsafe.ai/skill/@samber/golang-spf13-cobra/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@samber/golang-spf13-cobra/installs)](https://skillsafe.ai/skill/@samber/golang-spf13-cobra/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@samber/golang-spf13-cobra/scan)](https://skillsafe.ai/skill/@samber/golang-spf13-cobra/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@samber/golang-spf13-cobra/eval)](https://skillsafe.ai/skill/@samber/golang-spf13-cobra/)