Design and update command-line interface specifications — subcommands, short/long options, and operands — following POSIX and GNU standards. Use when asked to design, create, plan, specify, review, or update a CLI tool's interface, commands, flags, or argument structure, like git, ls, wc, or curl.
This skill operates in two modes:
Triggered when the user describes a tool idea without an existing spec.
Triggered when the user provides an existing spec and a change request.
All sections are required. Produce them in this order.
One synopsis line per command/subcommand, using man-page notation:
tool [GLOBAL-OPTIONS] <subcommand> [OPTIONS] <OPERAND> [OPERAND ...]
tool [GLOBAL-OPTIONS] <subcommand> [OPTIONS] -o <file> <OPERAND>
tool --help | --version
| Notation | Meaning |
|----------|---------|
| [-x] | optional flag |
| <operand> | required positional (placeholder) |
| [operand ...] | zero or more operands |
| {a\|b} | mutually exclusive, choose one |
| -- | end of options; everything after is treated as an operand |
tool
├── subcommand-a One-line description
│ └── sub-sub Only if genuinely needed
├── subcommand-b One-line description
└── subcommand-c One-line description
Rules:
--helprm/remove, ls/list) on the same line| Short | Long | Arg | Required | Default | Description |
|-------|------|-----|----------|---------|-------------|
| -o | --output | <file> | No | stdout | Write output to <file> instead of stdout |
| -v | --verbose | — | No | off | Print additional diagnostic information |
Column rules:
-x form, or blank if none--word or --word-word<file>, <n>, <format>) or — for boolean flags— if not applicableStandard options every tool must include:
| Short | Long | Description |
|-------|------|-------------|
| -h | --help | Print usage information and exit 0 |
| | --version | Print version string and exit 0 |
Common standard options — include as appropriate:
| Short | Long | Description |
|-------|------|-------------|
| -v | --verbose | Increase verbosity; repeatable (-vvv) |
| -q | --quiet | Suppress all non-error output; mutually exclusive with --verbose |
| -n | --dry-run | Print what would happen without executing |
| -f | --force | Skip confirmation prompts |
| -o | --output | Write output to a file instead of stdout |
| -r / -R | --recursive | Recurse into directories |
| -y | --yes | Assume yes to all prompts |
| | --no-color | Disable colored output (also honor NO_COLOR env var) |
| | --config | Path to config file |
See GNU_CONVENTIONS.md for the full canonical list.
| # | Name | Type | Required | Description |
|---|------|------|----------|-------------|
| 1 | source | path | Yes | File to read; use - for stdin |
| 2+ | dest | path | Yes | Destination path; repeatable |
Column rules:
N+ for repeatable operands starting at position Npath, file, dir, string, integer, url, or domain-specific- is accepted as stdin/stdout substitute| Code | Meaning | |------|---------| | 0 | Success | | 1 | Operational error — the command ran but the operation failed | | 2 | Misuse — bad invocation: unknown option, missing required argument, wrong type |
Add additional codes only when needed. Document each one — scripts depend on them.
| Variable | Default | Description |
|----------|---------|-------------|
| TOOL_CONFIG | ~/.toolrc | Path to the default config file |
| NO_COLOR | unset | Disable color output when set to any value |
3–6 annotated examples covering common use cases and important edge cases:
# Basic usage
tool input.txt
# Specify output explicitly
tool -o result.txt input.txt
# Read from stdin, write to stdout (pipeline-friendly)
cat input.txt | tool -
# Dry run to preview changes
tool --dry-run --verbose input.txt
# Subcommand usage
tool subcommand --flag <operand>
add-remote, push-all--verb or --verb-noun: --set-upstream, --sort-by<file>, <format>, <n>--format, all must use --format, not --output-formatprogname: descriptive message (not Error: ...)--output=json or --porcelain patternNO_COLOR env var for colored output--yes/--force--help and --version present at every level- accepted as stdin/stdout wherever files are acceptedFor all 14 POSIX utility guidelines: POSIX_GUIDELINES.md For real-world annotated examples (git, ls, wc, curl): EXAMPLES.md
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer