What problem does it solve? CLI tools often break downstream pipelines by mixing diagnostics into stdout, using inconsistent exit codes, or lacking machine-readable output. This Skill provides language-agnostic design rules and implementation patterns for building CLIs that compose cleanly in Unix pipelines and scripts. ## Core Features & Use Cases - Stream and Format Contracts: Enforces stdout-for-data and stderr-for-diagnostics separation, with a three-tier format hierarchy (human-readable, --plain, --json) plus NDJSON streaming. - Exit Codes, TTY Detection, and Error Design: Defines semantic exit codes (0, 1, 2, 75, 78, 130, 143), an 8-level TTY/color detection priority, and structured error envelopes with machine-readable codes and fix suggestions. - Implementation Resources: Provides TypeScript patterns for Result types, entry point wiring, formatters, signal handling, crash-only design, pager integration, and Vitest-based CLI contract testing. - Use Case: When building a new CLI tool, apply the verification checklist to guarantee piped output contains zero ANSI codes, every prompt has a --yes bypass, and JSON schemas remain stable across versions. ## Quick Start Use the cli-design skill to review my CLI tool's output layer and fix any stdout/stderr separation or exit code issues.