Individual skill
unix-cli
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.
skills/.experimental/unix-cli/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 7,075 bytesassets/templates/_template.mddoc · 865 bytesmetadata.jsonasset · 1,068 bytesreferences/_sections.mddoc · 1,894 bytesreferences/args-never-read-secrets-from-flags.mddoc · 1,984 bytesreferences/args-prefer-flags-over-positional.mddoc · 2,052 bytesreferences/args-provide-long-options.mddoc · 1,517 bytesreferences/args-require-help-version.mddoc · 2,100 bytesreferences/args-support-double-dash.mddoc · 1,630 bytesreferences/args-support-option-bundling.mddoc · 1,549 bytesreferences/args-use-getopt.mddoc · 1,801 bytesreferences/args-use-standard-flag-names.mddoc · 1,979 bytesreferences/config-env-naming.mddoc · 1,892 bytesreferences/config-follow-xdg.mddoc · 2,013 bytesreferences/config-never-store-secrets.mddoc · 2,232 bytesreferences/config-precedence-order.mddoc · 2,146 bytesreferences/config-respect-standard-vars.mddoc · 2,220 bytesreferences/error-actionable-messages.mddoc · 1,714 bytesreferences/error-avoid-stack-traces.mddoc · 1,946 bytesreferences/error-include-program-name.mddoc · 1,629 bytesreferences/error-use-strerror.mddoc · 1,819 bytesreferences/error-validate-early.mddoc · 2,359 bytesreferences/exit-distinguish-error-types.mddoc · 2,172 bytesreferences/exit-partial-success.mddoc · 1,759 bytesreferences/exit-signal-codes.mddoc · 1,641 bytesreferences/exit-use-standard-codes.mddoc · 2,062 bytesreferences/exit-zero-for-success.mddoc · 1,574 bytesreferences/help-include-examples.mddoc · 2,330 bytesreferences/help-show-defaults.mddoc · 1,816 bytesreferences/help-show-usage-on-error.mddoc · 1,754 bytesreferences/help-structure-help-output.mddoc · 2,667 bytesreferences/help-version-format.mddoc · 1,672 bytesreferences/io-atomic-writes.mddoc · 1,932 bytesreferences/io-be-stateless.mddoc · 1,881 bytesreferences/io-handle-binary-safely.mddoc · 1,880 bytesreferences/io-handle-multiple-files.mddoc · 2,177 bytesreferences/io-support-stdin.mddoc · 1,664 bytesreferences/io-write-to-stdout.mddoc · 1,906 bytesreferences/output-detect-tty.mddoc · 1,539 bytesreferences/output-line-based-text.mddoc · 1,817 bytesreferences/output-provide-machine-format.mddoc · 1,894 bytesreferences/output-respect-no-color.mddoc · 1,929 bytesreferences/output-stderr-for-errors.mddoc · 1,547 bytesreferences/output-stdout-for-data.mddoc · 1,584 bytesreferences/signal-cleanup-on-second-interrupt.mddoc · 1,861 bytesreferences/signal-handle-sigint.mddoc · 1,806 bytesreferences/signal-handle-sigpipe.mddoc · 1,670 bytesreferences/signal-handle-sigterm.mddoc · 1,964 bytes
Read excerpt
# UNIX/POSIX Standards CLI Best Practices
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).
## When to Apply
Reference these guidelines when:
- Writing new CLI tools in any language
- Parsing command-line arguments and flags
- Deciding what goes to stdout vs stderr
- Choosing appropriate exit codes
- Handling signals like SIGINT and SIGTERM
## Rule Categories by Priority