What problem does it solve?
Go project CLIs often suffer from inconsistent command structures, unclear flag vs positional usage, and brittle handlers. This Skill provides a design blueprint for building world-class CLIs with the go-command framework, covering command patterns, constraints, grouping, help text, and agent-friendly outputs.
Core Features & Use Cases
- Noun-Verb Hierarchy: Structure commands as
<noun> <verb> with clear targets.
- Declarative Constraints: Use
Exclusive, RequiredTogether, Requires, and Conflicts to declare behavior instead of writing bespoke validation.
- Layered Architecture: Thin handlers in commands, dedicated services, and clean separation of
internal and pkg code.
- Agent-Ready Patterns: Structured outputs with
Respond[T], mode awareness, and self-documenting command schemas for automation.
- Help & Grouping: Progressive disclosure,
Examples, Option.Group, and command grouping for large CLIs.
Quick Start
Design a new CLI command by applying the go-command design principles described here, including a noun-verb structure, proper flag vs positional usage, and thin, testable handlers.