unix-cli

Guide UNIX CLI tool development with POSIX conventions for arguments, exit codes, and streams.

193|17|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/pproenca/dot-skills --skill unix-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unix-cli
Source: https://github.com/pproenca/dot-skills/tree/main/skills/.experimental/unix-cli
Command: npx skills add https://github.com/pproenca/dot-skills --skill unix-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines for developing command-line interface (CLI) tools that adhere to UNIX philosophy and POSIX standards, ensuring they are robust, composable, and user-friendly.

Core Features & Use Cases

  • Argument Parsing: Best practices for handling command-line arguments and flags.
  • Exit Codes: Standardized exit codes for clear success/failure indication.
  • Output Streams: Correctly separating stdout and stderr for data and diagnostics.
  • Error Handling: Actionable error messages and robust error reporting.
  • Use Case: When developing a new CLI tool, consult this Skill to ensure it integrates seamlessly with the UNIX toolchain, provides clear feedback, and can be reliably scripted.

Quick Start

Follow the guidelines in this skill to implement proper argument parsing for your new command-line tool.

Frequently Asked Questions about unix-cli

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

FAQPage Schema
How do I build a POSIX-compliant CLI tool that integrates with the UNIX toolchain?

To build a POSIX-compliant CLI tool, follow guidelines for argument parsing, exit codes, output streams, and signal management to ensure your tool is composable, scriptable, and integrates seamlessly with the UNIX toolchain.

What is the correct way to handle output streams and error handling in command-line tools?

Correct command-line output stream handling requires separating stdout for data and stderr for diagnostics, paired with actionable error messages and standardized exit codes for robust error reporting.

How do I parse command-line arguments and flags according to POSIX conventions?

Parsing command-line arguments according to POSIX conventions involves adhering to standardized guidelines for flag handling and argument processing, ensuring your CLI tool remains user-friendly and scriptable.

Why do my UNIX command-line tools fail to script reliably in automated pipelines?

UNIX command-line tools fail to script reliably when they lack standardized exit codes, mix stdout and stderr streams, or ignore POSIX conventions, preventing proper composability and error handling in automated pipelines.

Can I use these POSIX guidelines for any new command-line tool regardless of scale?

Yes, these POSIX guidelines apply to any new command-line tool regardless of scale, providing comprehensive standards for argument parsing and signal management to ensure robust and user-friendly CLI development.

What are the best practices for managing signals and exit codes in UNIX CLI tools?

Best practices for managing signals and exit codes in UNIX CLI tools include implementing standardized exit codes for clear failure indication and proper signal management to ensure robust, scriptable command-line operations.