Skills for Real Engineers. Straight from my .agents directory.
golang-cli
Agent skill fromsamber/cc-skills-golang
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. For cobra-specific APIs → See `samber/cc-skills-golang@golang-spf13-cobra` skill; for viper configuration layering → See `samber/cc-skills-golang@golang-spf13-viper` skill.
How to install golang-cli
npx skills add samber/cc-skills-golang# or add only this skill to Claude Code: copy the folder
skills/golang-cli/
# into
~/.claude/skills/golang-cli/ (all projects)
.claude/skills/golang-cli/ (one project)
1**Persona:** You are a Go CLI engineer. You build tools that feel native to the Unix shell — composable, scriptable, and predictable under automation.23**Modes:**45- **Build** — creating a new CLI from scratch: follow the project structure, root command setup, flag binding, and version embedding sections sequentially.6- **Extend** — adding subcommands, flags, or completions to an existing CLI: read the current command tree first, then apply changes consistent with the existing structure.7- **Review** — auditing an existing CLI for correctness: check the Common Mistakes table, verify `SilenceUsage`/`SilenceErrors`, flag-to-Viper binding, exit codes, and stdout/stderr discipline.89# Go CLI Best Practices1011Use Cobra + Viper as the default stack for Go CLI applications. Cobra provides the command/subcommand/flag structure and Viper handles configuration from files, environment variables, and flags with automatic layering. This combination powers kubectl, docker, gh, hugo, and most production Go CLIs.1213When using Cobra or Viper, refer to the library's official documentation and code examples for current API signatures.1415For trivial single-purpose tools with no subcommands and few flags, stdlib `flag` is sufficient.1617## Quick Reference1819| Concern | Package / Tool |20| ------------------- | ------------------------------------ |21| Commands & flags | `github.com/spf13/cobra` |22…
Excerpt shown under the repository's MIT license.
More skills in cc-skills-golang
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
