unix-cli by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill unix-cli遵循 UNIX 惯例构建命令行工具的综合指南,专为 AI 代理和 LLM 设计。包含 8 个类别共 44 条规则,按影响程度从关键(参数处理、退出码、输出流)到渐进(配置和环境)进行优先级排序。
在以下情况下参考本指南:
| 优先级 | 类别 | 影响程度 | 前缀 |
|---|---|---|---|
| 1 | 参数与标志设计 | 关键 | args- |
| 2 | 退出码 | 关键 | exit- |
| 3 | 输出流 | 关键 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
output-| 4 | 错误处理 | 高 | error- |
| 5 | 输入/输出与组合 | 高 | io- |
| 6 | 帮助与文档 | 中高 | help- |
| 7 | 信号与健壮性 | 中 | signal- |
| 8 | 配置与环境 | 中 | config- |
args-use-getopt - 使用标准参数解析库args-provide-long-options - 为所有短选项提供长选项args-support-double-dash - 支持双破折号以终止选项args-require-help-version - 实现 --help 和 --version 选项args-prefer-flags-over-positional - 优先使用标志而非位置参数args-use-standard-flag-names - 使用标准标志名称args-never-read-secrets-from-flags - 切勿从命令行标志读取密钥args-support-option-bundling - 支持选项捆绑exit-zero-for-success - 仅在成功时返回零exit-use-standard-codes - 使用标准退出码exit-signal-codes - 使用 128+N 表示信号终止exit-partial-success - 一致地处理部分成功exit-distinguish-error-types - 使用不同的退出码区分错误类型output-stdout-for-data - 仅将数据写入 stdoutoutput-stderr-for-errors - 将错误和诊断信息写入 stderroutput-detect-tty - 检测 TTY 以输出面向人类的内容output-provide-machine-format - 提供机器可读的输出格式output-line-based-text - 对文本流使用基于行的输出output-respect-no-color - 尊重 NO_COLOR 环境变量error-include-program-name - 在错误消息中包含程序名称error-actionable-messages - 使错误消息具有可操作性error-use-strerror - 对系统错误使用 strerrorerror-avoid-stack-traces - 避免在面向用户的错误中显示堆栈跟踪error-validate-early - 尽早验证输入并快速失败io-support-stdin - 支持从 stdin 读取io-write-to-stdout - 默认将输出写入 stdoutio-be-stateless - 设计无状态操作io-handle-binary-safely - 安全地处理二进制数据io-atomic-writes - 使用原子文件写入io-handle-multiple-files - 一致地处理多个输入文件help-show-usage-on-error - 在参数错误时显示简要用法help-structure-help-output - 一致地组织帮助输出help-show-defaults - 在帮助中显示默认值help-include-examples - 在帮助中包含实用示例help-version-format - 正确格式化版本输出signal-handle-sigint - 优雅地处理 SIGINTsignal-handle-sigterm - 处理 SIGTERM 以实现干净关闭signal-handle-sigpipe - 处理 SIGPIPE 以应对管道中断signal-cleanup-on-second-interrupt - 在第二次中断时跳过清理config-follow-xdg - 遵循 XDG 基础目录规范config-precedence-order - 按正确的优先级顺序应用配置config-env-naming - 使用一致的环境变量命名config-never-store-secrets - 切勿在配置文件或环境中存储密钥config-respect-standard-vars - 尊重标准环境变量阅读各个参考文件以获取详细解释和代码示例:
| 文件 | 描述 |
|---|---|
| references/_sections.md | 类别定义和排序 |
| assets/templates/_template.md | 新规则模板 |
| metadata.json | 版本和参考信息 |
每周安装次数
80
代码仓库
GitHub 星标数
88
首次出现
2026 年 1 月 25 日
安全审计
安装于
codex70
opencode69
gemini-cli67
claude-code65
github-copilot64
cursor62
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 argumentsexit-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 streamserror-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 |
Weekly Installs
80
Repository
GitHub Stars
88
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex70
opencode69
gemini-cli67
claude-code65
github-copilot64
cursor62
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
120,000 周安装
Firebase AI Logic 入门指南:为移动和Web应用集成Gemini生成式AI
14,100 周安装
Firebase Hosting 入门指南:快速部署静态网站与动态内容托管教程
14,100 周安装
Stitch 设计专家:AI 提示词驱动的 UI/UX 设计系统与高保真原型生成工具
13,800 周安装
Firecrawl Download:一键下载整个网站为本地文件,支持Markdown、截图等多种格式
13,700 周安装
Python测试模式指南:pytest、fixtures、模拟与TDD实战教程
13,500 周安装
Firecrawl Map:网站URL发现工具,快速映射和搜索网站页面
13,700 周安装
args-use-standard-flag-namesargs-never-read-secrets-from-flags - Never read secrets from command-line flagsargs-support-option-bundling - Support option bundlingoutput-respect-no-color