UNIX command-line interface guidelines for building tools that follow POSIX conventions, proper exit codes, stream handling, and the UNIX philosophy. This skill should be used when writing, reviewing, or designing CLI tools to ensure they integrate properly with the UNIX tool chain. Triggers on tasks involving CLI tools, command-line arguments, exit codes, stdout/stderr, signals, or shell scripts.
Comprehensive guidelines for building command-line tools that follow UNIX conventions, designed for AI agents and LLMs. Contains 44 rules across 8 categories, prioritized by impact from critical (argument handling, exit codes, output streams) to incremental (configuration and environment).
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Argument & Flag Design | CRITICAL | args- |
| 2 | Exit Codes | CRITICAL | exit- |
| 3 | Output Streams | CRITICAL | output- |
| 4 | Error Handling | HIGH | error- |
| 5 | I/O & Composition | HIGH | io- |
| 6 | Help & Documentation | MEDIUM-HIGH | help- |
| 7 | Signals & Robustness | MEDIUM | signal- |
| 8 | Configuration & Environment | MEDIUM | config- |
args-use-getopt - Use standard argument parsing librariesargs-provide-long-options - Provide long options for all short optionsargs-support-double-dash - Support double-dash to terminate optionsargs-require-help-version - Implement --help and --version optionsargs-prefer-flags-over-positional - Prefer flags over positional argumentsargs-use-standard-flag-names - Use standard flag namesargs-never-read-secrets-from-flags - Never read secrets from command-line flagsargs-support-option-bundling - Support option bundlingexit-zero-for-success - Return zero for success onlyexit-use-standard-codes - Use standard exit codesexit-signal-codes - Use 128+N for signal terminationexit-partial-success - Handle partial success consistentlyexit-distinguish-error-types - Distinguish error types with different exit codesoutput-stdout-for-data - Write data to stdout onlyoutput-stderr-for-errors - Write errors and diagnostics to stderroutput-detect-tty - Detect TTY for human-oriented outputoutput-provide-machine-format - Provide machine-readable output formatoutput-line-based-text - Use line-based output for text streamsoutput-respect-no-color - Respect NO_COLOR environment variableerror-include-program-name - Include program name in error messageserror-actionable-messages - Make error messages actionableerror-use-strerror - Use strerror for system errorserror-avoid-stack-traces - Avoid stack traces in user-facing errorserror-validate-early - Validate input early and fail fastio-support-stdin - Support reading from stdinio-write-to-stdout - Write output to stdout by defaultio-be-stateless - Design stateless operationsio-handle-binary-safely - Handle binary data safelyio-atomic-writes - Use atomic file writesio-handle-multiple-files - Handle multiple input files consistentlyhelp-show-usage-on-error - Show brief usage on argument errorshelp-structure-help-output - Structure help output consistentlyhelp-show-defaults - Show default values in helphelp-include-examples - Include practical examples in helphelp-version-format - Format version output correctlysignal-handle-sigint - Handle SIGINT gracefullysignal-handle-sigterm - Handle SIGTERM for clean shutdownsignal-handle-sigpipe - Handle SIGPIPE for broken pipessignal-cleanup-on-second-interrupt - Skip cleanup on second interruptconfig-follow-xdg - Follow XDG Base Directory Specificationconfig-precedence-order - Apply configuration in correct precedence orderconfig-env-naming - Use consistent environment variable namingconfig-never-store-secrets - Never store secrets in config files or environmentconfig-respect-standard-vars - Respect standard environment variablesRead individual reference files for detailed explanations and code examples:
| File | Description | |------|-------------| | references/_sections.md | Category definitions and ordering | | assets/templates/_template.md | Template for new rules | | metadata.json | Version and reference information |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer