Golang CLI

Cobra+Viper CLI patterns: exit codes, stdout/stderr, flag-to-Viper binding, testable commands.

Tested · Works

Test report

Verdict
Tested · Works
Score
9.2/10
Tested
Jul 20, 2026
Environment
Claude Code 2.x (agent harness)
Upstream re-checked
Aug 10, 2026 · d861c04

Fetched the repo tree (46 SKILL.md files; monorepo plugin) and pulled skills/golang-cli/SKILL.md raw plus plugin.json. All 12 assets/examples/*.go files referenced by the body (main/root/serve/flags/args/config/version/exit_codes/output/signal/completion/cli_test) exist in the tree; root.go example is clean and matches the preached patterns (SilenceUsage/SilenceErrors, ConfigFileNotFoundError ignored, SetEnvPrefix+key replacer, BindPFlag). No exfiltration/base64/secrets; clawhub-publish.sh is a CI publisher, not a skill installer. Trigger phrasings tested — SHOULD: (1) "Help me build a Go CLI tool with subcommands and config file support" (2) "Review my cobra command setup — are exit codes and stdout/stderr handling correct?" (3) "Add a --output json flag and shell completion to my Go command-line app"; should NOT: (4) "Write a Go HTTP REST API server with chi router" (5) "How do I parse JSON into a struct in Go?" — 5/5 correct load decisions.

Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works

  • Installs cleanly 5/5
  • Triggers reliably 5/5
  • Output vs. baseline 8/10
  • Docs & honesty 5/5

What Golang CLI does

Guidance skill for building, extending, or reviewing Go CLI tools with Cobra and Viper — command structure, flag/config layering, Unix exit codes, signal handling, shell completion, and testable I/O. Triggers when building a Go command-line app or when code uses cobra, viper, or urfave/cli.

How to install Golang CLI

Copy the skills/golang-cli/ directory (SKILL.md + assets/examples/) into your project or personal .claude/skills/, or install the whole cc-skills-golang plugin. Requires the `go` toolchain on PATH.

Skills live in ~/.claude/skills/ (global) or .claude/skills/ (per-project). Restart Claude Code after installing.

Commands — how to trigger Golang CLI

  • /golang-cli Cobra+Viper CLI patterns: exit codes, stdout/stderr, flag-to-Viper binding, testable commands.

It also activates on plain-language prompts like these:

  • Add a new subcommand to this Go CLI
  • Set up flag parsing with cobra for this tool
  • Write unit tests for this CLI's argument validation

Frequently asked questions

Is the Golang CLI skill free?
Yes. The skill itself is free from samber/cc-skills-golang. SkillProof publishes the install command and an independent test verdict at no cost.
Does Golang CLI work with Claude Code?
We tested it with Claude Code 2.x (agent harness) on Jul 20, 2026. Verdict: Tested · Works. Fetched the repo tree (46 SKILL.md files; monorepo plugin) and pulled skills/golang-cli/SKILL.md raw plus plugin.json. All 12 assets/examples/*.go files referenced by the body (main/root/serve/flags/args/config/version/exit_codes/output/signal/completion/cli_test) exist in the tree; root.go example is clean and matches the preached patterns (SilenceUsage/SilenceErrors, ConfigFileNotFoundError ignored, SetEnvPrefix+key replacer, BindPFlag). No exfiltration/base64/secrets; clawhub-publish.sh is a CI publisher, not a skill installer. Trigger phrasings tested — SHOULD: (1) "Help me build a Go CLI tool with subcommands and config file support" (2) "Review my cobra command setup — are exit codes and stdout/stderr handling correct?" (3) "Add a --output json flag and shell completion to my Go command-line app"; should NOT: (4) "Write a Go HTTP REST API server with chi router" (5) "How do I parse JSON into a struct in Go?" — 5/5 correct load decisions.
What is the Golang CLI SkillProof Score?
9.2/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 8/10, docs & honesty 5/5.
How do I install Golang CLI?
Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
Can I use Golang CLI with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.