cli-patterns

Generate Go CLI templates with urfave/cli patterns for commands and hooks.

Updated Nov 11, 2025
One-click install
npx skills add https://github.com/vanman2024/cli-builder --skill cli-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-patterns
Source: https://github.com/vanman2024/cli-builder/tree/main/plugins/cli-builder/skills/cli-patterns
Command: npx skills add https://github.com/vanman2024/cli-builder --skill cli-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides battle-tested CLI patterns and templates for building reliable command-line tools across Go, TypeScript, Python, and Rust. It emphasizes simplicity, maintainability, and fast iteration for production CLIs.

Core Features & Use Cases

  • Basic CLI Structure: Single-command CLIs with flags, help text, and error handling.
  • Subcommands & Hooks: Multi-command CLIs with before/after hooks, categorization, and shared context.
  • Language Templates: Core templates and scripts for Go (urfave/cli), TypeScript (commander/oclif), Python (Click/Typer), and Rust (Clap).

Quick Start

Use this Skill to scaffold pattern templates and example CLIs, then adapt to your domain and language of choice.

Frequently Asked Questions about cli-patterns

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

FAQPage Schema
How do I build a maintainable command-line tool in Go?

Build maintainable Go CLIs using urfave/cli patterns that handle flags, subcommands, hooks, and context management. This Skill provides reusable templates and generation scripts for single and multi-command structures with error handling and environment variable fallbacks built in.

What's the best way to structure multi-command CLIs with hooks and categories?

Multi-command CLIs benefit from before/after hooks, subcommand categorization, and shared state management. This Skill covers these patterns across Go, TypeScript, Python, and Rust, with templates that implement help text, validation, and lifecycle hooks.

Can I use the same CLI patterns across Go, TypeScript, Python, and Rust?

Yes. This Skill provides cross-language CLI templates for Go (urfave/cli), TypeScript (commander/oclif), Python (Click/Typer), and Rust (Clap) that apply the same core patterns: flags, subcommands, context management, and error handling.

How do I scaffold a production CLI quickly without repetitive boilerplate?

Use generation scripts to scaffold production CLI templates adapted to your language and domain. The Skill includes comprehensive templates with functional requirements for command structure, help text, environment fallbacks, and hooks pre-configured.

What CLI patterns reduce maintenance burden for fast-growing command sets?

Reusable patterns for flag management, subcommand organization, before/after hooks, and shared context reduce maintenance as CLIs grow. This Skill provides battle-tested templates that satisfy functional requirements and scale from single to multi-command tools.