Token导航 LogoToken导航TokenDH.com
开发规范敏感数据github未标认证来源可访问clear审计通过

cli-development-guidelinesCLI 开发 guidelines

Agent Skill

cli-development-guidelines 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

474

周安装

19

GitHub Stars

26

下载量

154
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cli-development-guidelines(CLI 开发 guidelines)
来源仓库:https://github.com/outfitter-dev/agents
仓库路径:skills/cli-development-guidelines
安装命令:
npx skills add https://github.com/outfitter-dev/agents --skill cli-development-guidelines
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/outfitter-dev/agents --skill cli-development-guidelines

简介

cli-development-guidelines 定义 CLI 契约文档标准,明确命令、标志、IO 行为和退出码的可信承诺。

  • 适用于新工具设计、现有工具审计或 CI 合规检查,输出包含示例优先的帮助草案。
  • 强制要求安全行为:force 标志替代确认提示,destructive 操作必须有二次验证机制。
  • 支持脚本审计工具自动检测常见反模式,如硬编码路径、缺失错误处理和模糊输出格式。
  • 配置与环境变量需明确定义优先级顺序,避免因隐式覆盖引发难以追踪的 bug。

SKILL.md

CLI Development Guidelines

When to activate this skill

  • You are *designing*, *implementing*, or *reviewing* a command-line tool.
  • The user mentions (explicitly or implicitly): --help, flags, subcommands, exit codes, stdout/stderr, piping, JSON output, color, prompts, config files, env vars, “works in CI”, install/uninstall, telemetry.

What this skill produces

  • A *CLI contract* (what users can rely on): commands, flags, IO behavior, exit codes, config/env, examples, and safety behavior.
  • Draft *help output* and docs structure (example-first).
  • A *compliance audit* (when runnable) using scripts/cli_audit.py.

Non-negotiable CLI citizenship

  • Exit codes:

- 0 on success. - Non-zero on failure (and ideally meaningful, documented codes).

  • Streams:

- stdout is for primary output and machine-readable output. - stderr is for errors, warnings, progress, and “what I’m doing” messaging.

  • Discoverability:

- --help (and usually -h) shows help and exits. - --version prints version and exits.

  • Interactivity:

- Prompts only when stdin is a TTY. - Provide --no-input to force non-interactive behavior.

  • Scripting friendliness:

- No ANSI color / spinners when output isn’t a TTY. - Support NO_COLOR and --no-color. - Consider --json and --plain for stable output.

Workflow

Sketch the CLI contract first

  • Start from the user’s jobs-to-be-done (what they’re trying to accomplish).
  • Decide:

- Command shape: single command vs subcommands (noun verb is common). - Inputs: args vs flags vs stdin vs prompts vs config/env. - Outputs: human default, plus machine modes (--json, --plain, --quiet). - Safety: confirmations, --dry-run, --force, secret handling.

Use:

Implement with safe defaults

  • Use a CLI parsing library (don’t hand-roll).
  • Make “boundary-crossing” actions explicit:

- Network calls - Writing files not explicitly provided - Mutating remote state

  • Avoid footguns:

- Don’t accept secrets via flags or environment variables. - Don’t print stack traces by default. - Don’t assume TTY (detect it).

Validate and iterate

  • Run an automated sanity check (when possible):

- python scripts/cli_audit.py -- <your-cli> [subcommand]

  • Fix in this order:

- Broken stdout/stderr separation - Incorrect exit codes - Help that’s missing or undiscoverable - Unsafe defaults (destructive ops, secrets, hidden network writes) - Unscriptable output (no stable modes)

Use:

Reference library

Templates and scripts

  • CLI spec template: templates/cli-command-spec-template.json
  • Help text template: templates/help-text-template.md
  • Error message template: templates/error-message-template.md
  • Audit a CLI: scripts/cli_audit.py

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.66%
按下载量换算44

OpenCode

24.05%
按下载量换算37

Antigravity

20.04%
按下载量换算31

windsurf

13.94%
按下载量换算21

trae

8.71%
按下载量换算13

Cursor

3.58%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills