cli-pro

Design and standardize CLI interfaces with subcommands, flags, and shell completion.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/truongnat/skills --skill cli-pro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-pro
Source: https://github.com/truongnat/skills/tree/main/skills/cli-pro
Command: npx skills add https://github.com/truongnat/skills --skill cli-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams design and standardize professional command-line interfaces, aligning usage, help text, flag semantics, and cross-platform packaging across projects.

Core Features & Use Cases

  • Consistent argument and subcommand design for languages like Python, Node, Go, and Rust.
  • Stable stdout/stderr contracts, explicit exit codes, and predictable error handling for scriptable CLIs.
  • Guidance for shell completion, TTY behavior, and CI-friendly testing and validation.

Quick Start

Install and adopt CLI design guidelines to standardize flags, subcommands, and completion behavior.

Frequently Asked Questions about cli-pro

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

FAQPage Schema
How do I design a cross-platform CLI with consistent subcommands and global flags?

Designing a cross-platform CLI with consistent subcommands and global flags requires standardizing argument semantics and help text. This ensures professional command-line interfaces behave predictably across languages like Python, Node, Go, and Rust.

How should stdout and stderr contracts be handled for scriptable CLIs?

Stdout and stderr contracts must separate standard output from error messages to ensure scriptable CLIs function reliably. Enforcing explicit exit codes and predictable error handling allows automated pipelines to capture results accurately.

What is the best way to add shell completion to a command-line interface?

Adding shell completion to a command-line interface involves generating static or dynamic completion scripts for target shells. Following CLI design guidelines ensures completion behavior integrates seamlessly with subcommands and global flags.

Does TTY behavior affect CLI output when piping commands in CI environments?

TTY behavior directly affects CLI output when piping commands in CI environments. Proper handling of TTY semantics ensures the command-line interface adapts its output formatting for automated pipelines versus interactive terminal sessions.

Can I use this approach to refactor existing command-line interfaces for better testability?

You can refactor existing command-line interfaces to improve testability by applying standardized CLI design guidelines. This process aligns usage, help text, and cross-platform packaging to make CI-friendly testing and validation reliable.

Why do my CLI exit codes behave inconsistently across different operating systems?

CLI exit codes behave inconsistently across different operating systems due to unstandardized error handling. Enforcing explicit exit codes and stable stdout/stderr contracts ensures your command-line interface returns predictable results across platforms.