cli

Applies clig.dev guidelines to design CLI arguments, help text, output formatting, and error handling.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/kellymears/agents --skill cli-kellymears
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cli
Source: https://github.com/kellymears/agents/tree/main/plugins/cli/skills/cli
Command: npx skills add https://github.com/kellymears/agents --skill cli-kellymears

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Command-line tools often ship with inconsistent flags, cryptic errors, and output that breaks when piped. This Skill provides a decision framework based on the clig.dev guidelines so every CLI you build or review follows established conventions for usability and robustness. ## Core Features & Use Cases - Command and Flag Design: Standard flag names, flags-over-positional-arguments rules, secret handling, and proportional confirmation for destructive operations. - Help, Output, and Error Guidance: Example-led help text, TTY-aware formatting, stdout/stderr separation, human-readable error rewrites, and meaningful exit codes. - Configuration and Robustness: XDG-compliant config precedence, standard environment variables, progress indicators, network timeouts, and graceful Ctrl-C handling. - Use Case: When adding a new subcommand to a yargs, commander, clap, cobra, click, or argparse tool, use this Skill to validate flag naming, help output, and piped-output behavior against a 16-point review checklist. ## Quick Start Review my CLI tool's argument parsing and help output against the clig.dev guidelines and suggest fixes.

Frequently Asked Questions about cli

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

FAQPage Schema
How do I design CLI flags and arguments correctly?▼

Prefer flags over positional arguments since they are self-documenting and order-independent. Use standard names like -h/--help, -f/--force, and --json, reserve short flags for frequent operations, and never accept secrets via flags because they leak through ps and shell history.

What should CLI help text include?▼

Help text should lead with realistic example invocations, list common commands and flags before the exhaustive list, and include a repo or website link. Running the command with no arguments should show concise help rather than an error or a hang.

Does this work with argument parsers like commander, clap, or click?▼

Yes, the guidelines apply to any argument-parsing library including yargs, commander, clap, cobra, click, and argparse. The recommendations cover conventions these libraries implement, such as help generation, exit codes, and flag ordering.

Why does CLI color output break when piped?▼

Color and animations must be disabled when stdout is not a TTY, when NO_COLOR is set, when TERM=dumb, or when --no-color is passed. Emitting escape sequences into piped output corrupts downstream parsing, so tools should detect TTY status and emit clean data.

What is the correct CLI configuration precedence order?▼

Precedence from highest to lowest is: flags, environment variables, project-level config, user-level config in ~/.config/, then system-wide config in /etc/. Tools should follow the XDG Base Directory Specification rather than placing dotfiles directly in $HOME.

When should a CLI prompt for confirmation?▼

Confirmation should scale with severity: minor local changes need none, major remote changes should prompt with an optional dry-run preview, and irreversible deletion should require typing the resource name or a dedicated flag. Prompts only appear when stdin is a TTY.