{"id":"e3bf3f24-e463-406e-88f2-2adba4b4b655","slug":"clawhub-samber-golang-spf13-cobra","name":"golang-spf13-cobra","description":"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`.","canonicalUrl":"https://www.xpersona.co/agent/clawhub-samber-golang-spf13-cobra","sourceUrl":"https://clawhub.ai/samber/golang-spf13-cobra","homepage":"https://clawhub.ai/samber/skills/golang-spf13-cobra","source":"CLAWHUB","vendor":{"slug":"clawhub","label":"Clawhub","url":"https://clawhub.ai/samber/skills/golang-spf13-cobra"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":"1.1.0","freshnessAt":"2026-10-11T14:31:24.609Z","freshnessLabel":"Oct 11, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Oct 11, 2026"},{"label":"Vendor","value":"Clawhub"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"1.1.0"}],"factsPreview":[{"factKey":"vendor","category":"vendor","label":"Vendor","value":"Clawhub","href":"https://clawhub.ai/samber/skills/golang-spf13-cobra","sourceUrl":"https://clawhub.ai/samber/skills/golang-spf13-cobra","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T14:31:24.676Z","isPublic":true},{"factKey":"protocols","category":"compatibility","label":"Protocol compatibility","value":"OpenClaw","href":"https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-spf13-cobra/contract","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-spf13-cobra/contract","sourceType":"contract","confidence":"medium","observedAt":"2026-10-11T14:31:24.676Z","isPublic":true},{"factKey":"traction","category":"adoption","label":"Adoption signal","value":"1K downloads","href":"https://clawhub.ai/samber/golang-spf13-cobra","sourceUrl":"https://clawhub.ai/samber/golang-spf13-cobra","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T14:31:24.676Z","isPublic":true},{"factKey":"latest_release","category":"release","label":"Latest release","value":"1.1.0","href":"https://clawhub.ai/samber/golang-spf13-cobra","sourceUrl":"https://clawhub.ai/samber/golang-spf13-cobra","sourceType":"release","confidence":"medium","observedAt":"2026-08-23T01:33:33.168Z","isPublic":true},{"factKey":"handshake_status","category":"security","label":"Handshake status","value":"UNKNOWN","href":"https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-spf13-cobra/trust","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-spf13-cobra/trust","sourceType":"trust","confidence":"medium","observedAt":null,"isPublic":true}],"highlights":["1K downloads","Trust evidence available"],"agentCard":{"name":"golang-spf13-cobra","description":"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`.","source":"CLAWHUB","sourceId":"clawhub:s173arkhs3131fq5jf769qq75583hdgt:golang-spf13-cobra","homepage":"https://clawhub.ai/samber/skills/golang-spf13-cobra","repository":"https://clawhub.ai/samber/golang-spf13-cobra","documentation":"https://www.xpersona.co/agent/clawhub-samber-golang-spf13-cobra","protocols":["OPENCLEW"],"examples":[{"kind":"example","language":"bash","snippet":"go get github.com/spf13/cobra@latest"},{"kind":"example","language":"go","snippet":"var rootCmd = &cobra.Command{\n    Use:          \"myapp\",\n    Short:        \"One-line summary\",\n    SilenceUsage: true,  // ✓ prevents usage wall on every error\n    SilenceErrors: true, // ✓ lets you control error output format\n}"}]}}