cli-design

Provide best practices for designing command-line interface tools.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/semirm-dev/agent-army --skill cli-design-semirm-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-design
Source: https://github.com/semirm-dev/agent-army/tree/main/claude/skills/cli-design
Command: npx skills add https://github.com/semirm-dev/agent-army --skill cli-design-semirm-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and best practices for designing user-friendly, robust, and maintainable command-line interface (CLI) tools.

Core Features & Use Cases

  • Flag Conventions: Standardizes the use of long and short flags, boolean flags, and value flags.
  • Help Text Structure: Ensures clear, informative, and well-organized help messages.
  • Exit Codes: Defines consistent exit codes for success, general errors, and usage errors.
  • Error Messages: Guides the creation of actionable and informative error messages.
  • Output Formatting: Addresses human-readable vs. machine-readable output and JSON support.
  • Configuration Precedence: Outlines a clear order for resolving configuration settings.
  • Shell Completion: Provides examples for generating shell completion scripts.
  • Subcommand Organization: Offers strategies for structuring complex CLIs.
  • Use Case: When developing a new CLI application, consult this Skill to ensure it adheres to industry standards for usability and robustness.

Quick Start

Design your CLI tool's flags and help text according to the conventions outlined in this skill.

Frequently Asked Questions about cli-design

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

FAQPage Schema
What are the best practices for designing command-line interface flags?

Command-line interface design best practices include standardizing long and short flags, boolean flags, and value flags to ensure consistent user interactions and predictable input parsing.

How should I structure help text for a CLI tool?

Structuring CLI help text requires clear, informative, and well-organized messages that outline available subcommands, flag conventions, and usage examples for software engineers.

What exit codes should my command-line utility return?

Command-line utilities should define consistent exit codes for success, general errors, and usage errors to allow parent processes and shell scripts to handle execution results reliably.

How do I write actionable error messages for command-line tools?

Actionable CLI error messages guide users by clearly stating the problem and offering corrective steps, improving the overall usability and robustness of the command-line tool.

What is the correct configuration precedence for CLI applications?

Configuration precedence in CLI applications outlines a clear resolution order for settings, ensuring command-line flags consistently override environment variables and default configuration files.

How do I organize subcommands for a complex command-line interface?

Organizing CLI subcommands involves applying specific structuring strategies to group related actions, ensuring the command-line interface remains maintainable and user-friendly as complexity grows.