cobra-patterns

Installation
SKILL.md

Cobra Patterns Skill

Production-ready patterns for building powerful CLI applications with Cobra, following best practices from kubectl, hugo, and other production CLIs.

Instructions

1. Choose CLI Structure Pattern

Select the appropriate CLI structure based on your use case:

  • simple: Single command with flags (quick utilities)
  • flat: Root command with subcommands at one level
  • nested: Hierarchical command structure (kubectl-style)
  • plugin: Extensible CLI with plugin support
  • hybrid: Mix of built-in and dynamic commands

2. Generate Cobra CLI Structure

Use the setup script to scaffold a new Cobra CLI:

Installs
2
First Seen
Jun 29, 2026
cobra-patterns — vanman2024/cli-builder