unix-cli
БесплатноБез исполняемых скриптовНе проверенUNIX command-line interface guidelines for building tools that follow POSIX conventions, proper exit codes, stream handling, and the UNIX philosophy. This…
от pproenca★ 231 звезда на GitHubОб этом скилле
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
| 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- |
Quick Reference
1. Argument & Flag Design (CRITICAL)
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 bundling
2. Exit Codes (CRITICAL)
exit-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 codes
3. Output Streams (CRITICAL)
output-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 variable
4. Error Handling (HIGH)
error-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 fast
5. I/O & Composition (HIGH)
io-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 consistently
6. Help & Documentation (MEDIUM-HIGH)
help-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 correctly
7. Signals
Установить unix-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 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.
Как установить скилл unix-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unix-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic