Skillshub unix-cli

UNIX/POSIX Standards CLI Best Practices

install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/unix-cli" ~/.claude/skills/comeonoliver-skillshub-unix-cli && rm -rf "$T"
manifest: skills/pproenca/dot-skills/unix-cli/SKILL.md
source content

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

PriorityCategoryImpactPrefix
1Argument & Flag DesignCRITICAL
args-
2Exit CodesCRITICAL
exit-
3Output StreamsCRITICAL
output-
4Error HandlingHIGH
error-
5I/O & CompositionHIGH
io-
6Help & DocumentationMEDIUM-HIGH
help-
7Signals & RobustnessMEDIUM
signal-
8Configuration & EnvironmentMEDIUM
config-

Quick Reference

1. Argument & Flag Design (CRITICAL)

2. Exit Codes (CRITICAL)

3. Output Streams (CRITICAL)

4. Error Handling (HIGH)

5. I/O & Composition (HIGH)

6. Help & Documentation (MEDIUM-HIGH)

7. Signals & Robustness (MEDIUM)

8. Configuration & Environment (MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information