From dedene-skills
Use when building, scaffolding, or expanding Go CLIs for APIs, SaaS, Homebrew distribution, or Kong-based command surfaces, following a phased research-to-ship quality loop.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dedene-skills:go-cli-builderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build production-grade Go CLIs in Peter's house style: useful vertical slices first, agent-friendly command contracts, strong auth/config/output boundaries, and shippable Homebrew distribution.
Build production-grade Go CLIs in Peter's house style: useful vertical slices first, agent-friendly command contracts, strong auth/config/output boundaries, and shippable Homebrew distribution.
go.mod, Makefile, .goreleaser.yaml, README.md, cmd/, internal/, tests, docs, current command grammar.~/Development/Personal/go-cli-development-guide.md, then sample the closest existing CLIs: nimbu-go-cli, frontapp-cli, harvest-cli, raindrop-cli.references/cli-quality-loop.md when shaping scope, phases, artifacts, or verification gates.references/local-go-cli-patterns.md before scaffolding, changing command grammar, auth/config/output, release setup, or tests.Prefer a hand-shaped Go CLI over generated breadth. Start with one valuable vertical slice that proves auth, transport, output, errors, tests, and release shape.
Use this package layout unless the repo already has stronger conventions:
cmd/<binary>/main.go
internal/api/ # clients, transport, typed API errors, resource methods
internal/auth/ # login/token/session/keyring/env handling
internal/config/ # config files, profiles/accounts, paths
internal/cmd/ # Kong commands and command wiring
internal/output/ # table/json/plain, colors, terminal helpers
internal/errfmt/ # actionable user-facing errors
internal/ui/ # optional TUI/wizards/spinners only when useful
Use Kong for new CLIs, matching nimbu, frontcli, harvest, and raindrop. Use Cobra only when the existing repo already uses Cobra or interoperability demands it.
| Phase | Purpose | Output |
|---|---|---|
| 0 Resolve + Reuse | Existing repo, docs/spec/HAR/Postman/WSDL, tokens, prior CLIs | source map + constraints |
| 1 Research Brief | API identity, user jobs, auth, rate limits, product thesis | short brief |
| 2 Ecosystem Scan | Existing CLIs/MCPs/SDKs, Nimbu/frontcli/harvest patterns | ecosystem notes |
| 3 Discovery Gate | API quirks, sampled responses, SOAP/XML/HAR provenance | discovery notes |
| 4 Docs Parity Gate | planned commands checked against primary docs/spec/WSDL/Postman/HAR evidence | command-to-doc matrix |
| 5 Scaffold Slice | Small working CLI slice | buildable repo |
| 6 Build Useful CLI | workflow commands, safe mutations, output contracts | real commands |
| 7 Shipcheck | fmt/lint/test, help/version, doctor, read-only smoke | proof block |
| 8 Distribution | GoReleaser, Homebrew tap, install docs | releasable binary |
Build one excellent CLI; add catalog or marketplace machinery only if the user explicitly asks for a family of CLIs.
tool invoices get --invoice 123 --json, not hidden positional ID chains.--file or clear inline assignments; make them mutually exclusive.--json. Add --plain/TSV when shell pipelines matter.--no-input, --readonly or env equivalent, --dry-run for mutating previews, and --force for destructive actions.Before handoff, run the repo gate: usually make ci or make fmt-check lint test. Also smoke:
make build
./bin/<binary> --help
./bin/<binary> version 2>/dev/null || ./bin/<binary> --version
./bin/<binary> auth doctor 2>/dev/null || true
For bug fixes or durable behavior, add regression tests. For API integrations, prefer read-only live smoke when credentials are available; otherwise use fixture servers, golden SOAP/XML payloads, or recorded responses.
Docs parity is a release gate, not a research note:
npx claudepluginhub dedene/skills --plugin ultracodeDevelops, extends, and audits Go CLI applications using Cobra, Viper, and urfave/cli — covering command structure, flag handling, configuration layering, version embedding, I/O patterns, signal handling, and shell completion.
Builds command-line tools in Go: flag handling, subcommands, stdout/stderr discipline, exit codes, signal handling, and Cobra/Viper usage. Use when building a CLI, adding subcommands, or parsing flags.
Builds, reviews, and refactors Go CLIs that manage processes, daemons, job runners, and concurrent workloads, covering signal handling, child process control, and graceful shutdown.