coding-standard
Use when designing, implementing, or reviewing an agent-friendly CLI, including commands, flags, help text, output, errors, and safety behavior.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- kind
- dev
- name
- coding-standard
- keywords
- [ "cli", "cli-spec", "cli-design", "cli-implementation", "cli-audit", "agent-friendly", "composability", "idempotent", "retry-safe" ]
- description
- Use when designing, implementing, or reviewing an agent-friendly CLI, including commands, flags, help text, output, errors, and safety behavior.
02 资源文件 9
- 参考文档references/CliAudit/MetaSkill.md8.8 KB
- 参考文档references/CliImpl/MetaSkill.md6.5 KB
- 参考文档references/CliImpl/references/checklist.md6.2 KB
- 参考文档references/CliImpl/references/full-guidelines.md69.3 KB
- 参考文档references/CliImpl/references/High-Level Concepts.md1.6 KB
- 参考文档references/CliImpl/references/index.md911 B
- 参考文档references/CliSpec/MetaSkill.md3.9 KB
- 参考文档references/CliSpec/references/cli-guidelines.md8.8 KB
- 参考文档references/CliSpec/references/source.md71 B
03 SKILL.md 正文
Coding Standard
Language-agnostic coding disciplines: what good design looks like, regardless of implementation language.
Output contract
Every script and CLI answers in one compact JSON line. script-output holds the rule, how to read the answer, and why; read it before you design or change what a command prints. It overrides the sub-skills' advice on output, such as a silent success or an opt-in --json.
- Everything passed:
{"ok":true}on stdout, exit 0 - Anything else: stdout stays empty, the last line of stderr is
{"ok":false,"errors":["…"]}, and the exit code is not 0. Each error says what failed and the command that fixes it - A warning that needs action fails the command; other detail moves to
-v - Data beside
okonly when it is the command's job: a list, a dry run,changessuch as[["add","path"]], or thefilea content command wrote --helpstays text
Sub-skills
When the user or project supplies its own CLI contract, follow it; use these sub-skills only for what it leaves open. Load the file of the row that matches the request:
| Request | Load |
|---|---|
| Write a CLI spec that designs the surface and parameters before implementing, or refactors an existing surface: command tree, args and flags tables, output rules, exit code map, config precedence, examples, from a condensed clig.dev rubric | references/CliSpec/MetaSkill.md |
| Build or implement a CLI, or review its code or UX: I/O streams, help text, output, errors, argument parsing, interactivity, subcommands, robustness, signals, configuration, env vars, naming, distribution, and a 100+ item stress-test checklist | references/CliImpl/MetaSkill.md |
Audit a CLI for agent-friendliness: requirements, structured output, composability and pipelines, all inputs via flags, idempotent and retry-safe commands, non-interactive operation, operability, errors resolvable in one attempt, safety checks with --dry-run and --force |
references/CliAudit/MetaSkill.md |
Out of scope
- Language syntax, idioms, tooling, package managers, and framework patterns: use
coding-language
Credits
- CLI Guidelines -- clig.dev by Aanand Prasad, Ben Firshman, Carl Tashian, Eva Parish
- Agent-friendly requirements -- adapted from agent-scripts by Peter Steinberger
04 同仓库更多 Skills
writing-great-skills
Use when creating, modifying, evaluating a skill.
writing-for-agents
Use when creating, editing, or reviewing a skill, AGENTS.md, CLAUDE.md, or another document agents read.
why
Use for questions about design rationale, the history of regressions or incidents, or the evidence behind thresholds and tradeoffs. Use `how` for runtime behavior. Do not use for plain commit or date lookups.
verify-video-archive
Use when validating the macOS or Linux archive workflow reached by `just convert-video`, including real media, prerequisites, terminal progress, source safety, locking, and recovery.
verify-transcript
Use when validating transcript CLI behavior, locating its verification features, or running the paid YouTube end-to-end check.
verify-skills
Use when verifying `just compile-skills`, `just remote-skills`, `just install-skills`, or `just skills-discover` in the skills repository, such as after changing their scripts or adding, renaming, or moving a skill.