bysamber· 66 skills
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.
$npx -y skills add samber/cc-skills-golang --skill golang-spf13-cobraInstalls into the current project.
Run `npx skills use "https://github.com/samber/cc-skills-golang" --skill "samber/cc-skills-golang/golang-spf13-cobra"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/samber/cc-skills-golang" that are relevant to the current task. Run `npx skills add "https://github.com/samber/cc-skills-golang"` and select the relevant skills, then follow their instructions.