go-cli

Design and refactor Go CLI applications with Cobra and Bubble Tea.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/LucasPcq/worktree-manager-cli --skill go-cli-lucaspcq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-cli
Source: https://github.com/LucasPcq/worktree-manager-cli/tree/main/.claude/skills/go-cli
Command: npx skills add https://github.com/LucasPcq/worktree-manager-cli --skill go-cli-lucaspcq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you design, extend, and refactor production-grade Go command-line applications without drifting into inconsistent architecture, duplicated logic, or fragile command handling.

Core Features & Use Cases

  • Cobra command design: Structure roots, subcommands, flags, and command registration using consistent conventions.
  • Bubble Tea TUI workflows: Build interactive terminal screens for selection, wizards, confirmation flows, and command-driven navigation.
  • Configuration and validation: Parse configuration files and external inputs safely at the boundary before they reach business logic.
  • Output and styling discipline: Keep terminal rendering, formatting, and styling centralized for predictable CLI behavior.
  • Use case: You can use this Skill when adding a new Go CLI command, introducing a TUI picker, reorganizing packages, or hardening tests for a terminal tool.

Quick Start

Ask me to help you build or refactor a Go CLI command, and I will apply the project’s architecture, validation, testing, and TUI patterns to produce a clean implementation plan.

Frequently Asked Questions about go-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Go CLI application with Cobra and Bubble Tea?

To structure a Go CLI application with Cobra and Bubble Tea, you organize command trees, flags, and interactive terminal screens into a strict layered architecture with centralized constants and pure domain rules.

What is the best way to parse configuration files in a Go CLI safely?

The best way to parse configuration files in a Go CLI safely is to validate external inputs strictly at the boundary before they reach your business logic, ensuring pure domain rules and safe testing patterns without unsafe type assertions.

Can I use Bubble Tea to build interactive terminal UIs within a Cobra command structure?

Yes, you can use Bubble Tea to build interactive terminal UIs within a Cobra command structure by applying consistent conventions for command registration, TUI navigation, and centralized output formatting.

How do I refactor a Go CLI to avoid duplicated logic and fragile command handling?

You refactor a Go CLI to avoid duplicated logic and fragile command handling by enforcing a strict layered architecture, centralizing output styling, and replacing nested conditionals with boundary validation and pure domain rules.

Does this approach support safe testing patterns for Go CLI applications without unsafe type assertions?

Yes, this approach supports safe testing patterns for Go CLI applications by enforcing strict layered architecture and boundary validation, deliberately avoiding unsafe type assertions and nested conditionals in your domain rules.