cli-creator

Design CLI command trees, flags, and output contracts before implementation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/pascalandy/dotfiles --skill cli-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-creator
Source: https://github.com/pascalandy/dotfiles/tree/main/dot_config/opencode/skill/std-cli-guideline-short
Command: npx skills add https://github.com/pascalandy/dotfiles --skill cli-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Designing consistent and human-friendly CLI interfaces before implementation to prevent scope creep and UX drift.

Core Features & Use Cases

  • CLI surface planning: define command tree, arguments, flags, subcommands, help text, and output formats.
  • UX guidelines: establish error handling, exit codes, and config/env precedence.
  • Use Case: Before building a new tool, create a complete CLI spec that teams can implement from.

Quick Start

Draft a complete CLI spec for a hypothetical tool named mycmd. Include a root command with global flags, a subcommand (e.g., init) with its own options, a USAGE synopsis, and an example invocation such as: mycmd init --config config.yaml --dry-run --help

Frequently Asked Questions about cli-creator

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

FAQPage Schema
How do I design a CLI command tree before implementation?

To design a CLI command tree before implementation, define the root command, global flags, subcommands, and argument semantics. This process prevents scope creep and UX drift by establishing a complete command surface area and help text structure upfront.

What should be included in a CLI specification?

A CLI specification should include the command tree, USAGE synopsis, global flags, subcommands, I/O rules, error codes, config and environment precedence, and example invocations. Defining these elements ensures consistent human-friendly and automation-ready interfaces.

Why define error codes and config precedence for command-line tools?

Defining error codes and config or environment precedence for command-line tools establishes clear UX guidelines for error handling and exit codes. This prevents unpredictable behavior by setting strict I/O rules and configuration hierarchy before implementation begins.

How do I write a USAGE synopsis for a new command-line tool?

Writing a USAGE synopsis for a command-line tool involves documenting the root command, available subcommands like init, specific options such as --config and --dry-run, and example invocations. This defines the exact argument semantics and output contracts for humans and automation.

Can I plan output formats and I/O rules for CLI automation?

Yes, you can plan output formats and I/O rules for CLI automation by defining output contracts within the CLI spec. Establishing these rules before implementation ensures the command-line tool reliably serves both human users and automated systems.

When do I need to create a CLI spec instead of just coding?

You need to create a CLI spec instead of just coding when building a new tool that requires a command tree, global flags, and subcommands. Defining the CLI surface area beforehand prevents scope creep and UX drift during the actual implementation phase.