Go CLI Development

Go CLI Development

sahit-sai 890522f 2 files · 1019 B Updated

File contents

Go CLI Development

Use this skill when changing a Go command-line application.

Instructions

  • Start from the command behavior and its tests.
  • Prefer table-driven tests for parser, filter, and formatter behavior.
  • Keep command output stable and easy to parse.
  • Return errors from command handlers instead of exiting deep in library code.
  • Use gofmt before final verification.
  • Run targeted tests first, then the full suite and build.

Verification

go test ./...
go build -v ./cmd/<binary>
git diff --check

Output Design

  • Use tabs for machine-readable list output.
  • Include enough fields for users to decide the next command.
  • Keep detailed metadata in info commands rather than crowded list views.

sahit-sai/saviaa/tree/main/.agents/skills/go-cli-development commit 890522f1a3

Frequently asked questions

npx skillmds@latest add sahit-sai/go-cli-development