golang-cli
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.zipInstalls 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.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
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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| golang-cli (this skill) | 0 | 6mo | Review | Intermediate |
| bump-go-dependencies | 1 | 6mo | Review | Intermediate |
| opencode-cli | 14 | 10mo | Review | Advanced |
| bubbletea | 42 | 11mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by VIethoangnguyenle
View all by VIethoangnguyenle →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
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.
bubbletea
hmans
Browse Bubbletea TUI framework documentation and examples. Use when working with Bubbletea components, models, commands, or building terminal user interfaces in Go.
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.
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.
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.