Expert guidance for developing composable, production-ready Go CLI applications.

Install

mkdir -p .claude/skills/golang-cli && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13918" && unzip -o skill.zip -d .claude/skills/golang-cli && rm skill.zip

Installs to .claude/skills/golang-cli

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli.
348 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • →Set up a root command with Viper configuration initialization and global behavior via PersistentPreRunE.
  • →Add subcommands by creating separate files and registering them in init().
  • →Implement persistent flags inherited by all subcommands and local flags specific to a command.
  • →Validate arguments using Cobra's built-in validators or custom validation.
  • →Generate shell completions for bash, zsh, fish, and PowerShell.
  • →Test CLI commands by executing them programmatically and capturing output.

How it works

The skill guides the development of Go CLI applications by structuring commands, handling flags, and managing configuration using Cobra and Viper, following established best practices.

Inputs & outputs

You give it
Go source code for a CLI application
You get back
A structured Go CLI application with commands, flags, and configuration

When to use golang-cli

  • →Building new CLI tools
  • →Adding subcommands and flags
  • →Implementing configuration via Viper
  • →Testing CLI behavior

About golang-cli

Assists with command tree setup, flag binding, configuration layering, and unit testing for Go CLI tools. It follows established conventions for robust, scriptable CLI design.

Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also trig

When not to use it

  • →When building trivial single-purpose tools with no subcommands and few flags.

Prerequisites

go

Limitations

  • →The skill is designed for projects using Golang.
  • →The skill primarily focuses on Cobra and Viper for CLI development.
  • →The skill does not cover trivial single-purpose tools with no subcommands and few flags.

How it compares

This workflow provides a structured approach for building Go CLIs with Cobra and Viper, unlike manual development that might lack consistent command structure, flag binding, or configuration layering.

Compared to similar skills

golang-cli side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
golang-cli (this skill)06moReviewIntermediate
bump-go-dependencies16moReviewIntermediate
opencode-cli1410moReviewAdvanced
bubbletea4211moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

bump-go-dependencies

docker

Update direct Go module dependencies one by one, validating each bump with tests and linter, committing individually, and producing a summary table for a PR description

15

opencode-cli

SpillwaveSolutions

This skill should be used when configuring or using the OpenCode CLI for headless LLM automation. Use when the user asks to "configure opencode", "use opencode cli", "set up opencode", "opencode run command", "opencode model selection", "opencode providers", "opencode vertex ai", "opencode mcp servers", "opencode ollama", "opencode local models", "opencode deepseek", "opencode kimi", "opencode mistral", "fallback cli tool", or "headless llm cli". Covers command syntax, provider configuration, Vertex AI setup, MCP servers, local models, cloud providers, and subprocess integration patterns.

14174

bubbletea

hmans

Browse Bubbletea TUI framework documentation and examples. Use when working with Bubbletea components, models, commands, or building terminal user interfaces in Go.

42104

workflow-orchestration-patterns

wshobson

Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.

10117

gentleman-trainer

Gentleman-Programming

Vim Trainer RPG system patterns for Gentleman.Dots. Trigger: When editing files in installer/internal/tui/trainer/, adding exercises, modules, or game mechanics.

28

generate-subsystem-skills

llama-farm

Generate specialized skills for each subsystem in the monorepo. Creates shared language skills and subsystem-specific checklists for high-quality AI code generation.

17

Search skills

Search the agent skills registry