cli-tool-dev

Develops POSIX-compliant CLIs with strict validation, stderr errors, and defined exit codes.

1|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/dobachi/claude-skills-marketplace --skill cli-tool-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-tool-dev
Source: https://github.com/dobachi/claude-skills-marketplace/tree/main/plugins/cli-tool-dev/skills/cli-tool-dev
Command: npx skills add https://github.com/dobachi/claude-skills-marketplace --skill cli-tool-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you design and implement reliable command-line tools that behave predictably, present clear help, and handle invalid inputs safely.

Core Features & Use Cases

  • POSIX-compliant CLI design: Uses standard UNIX-style argument conventions and help formatting.
  • Strict validation and argument parsing: Supports required/optional args, defaults, and mutually exclusive options with clear error behavior.
  • Consistent exit codes and stderr messaging: Produces user-friendly failures with appropriate exit statuses.
  • Testing-ready deliverables: Ensures argument parsing and error handling paths are covered with unit tests.

Quick Start

Ask the AI: "Design a small POSIX-friendly CLI in Python with argparse that validates required arguments, provides standard UNIX help output, uses stderr for errors, and returns exit code 2 for argument mistakes."

Frequently Asked Questions about cli-tool-dev

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

FAQPage Schema
How do I build a POSIX-compliant CLI in Python with proper argument parsing?

Build a POSIX-compliant CLI by using standard UNIX argument conventions for parsing, validating required and optional flags, and formatting help output. This ensures your command-line tool behaves predictably and presents clear usage instructions.

What is the standard exit code for argument parsing errors in a UNIX CLI tool?

The standard exit code for argument parsing errors in a UNIX CLI tool is exit code 2. Consistent exit codes combined with stderr messaging produce user-friendly failures and testable error paths for invalid inputs.

How do I handle mutually exclusive options when developing a command-line interface?

Handle mutually exclusive options during CLI development by enforcing strict argument validation rules. This approach catches conflicting flags early, outputs clear error messages to stderr, and returns defined exit codes for predictable behavior.

How do I structure subcommands and required arguments for a new CLI tool?

Structure subcommands and required arguments by applying strict argument parsing that supports defaults and validation. This CLI development approach enforces POSIX conventions, generating standard UNIX help output and consistent error handling.

Does POSIX CLI development require unit tests for argument parsing and error handling?

POSIX CLI development requires unit tests for argument parsing and error handling paths to ensure testing-ready deliverables. Validating required arguments, defaults, and error exits guarantees the command-line interface handles invalid inputs safely.

Why should CLI errors be sent to stderr instead of stdout?

CLI errors should be sent to stderr instead of stdout to separate error messaging from standard program output. This POSIX convention allows users and scripts to handle failures appropriately using defined exit codes and clear stderr text.