Create Cli
by @steipete
Design command-line interface parameters and UX: arguments, flags, subcommands, help text, output formats, error messages, exit codes, prompts, config/env precedence, and safe/dry-run behavior. Use when you’re designing a CLI spec (before implementation) or refactoring an existing CLI’s surface area for consistency, composability, and discoverability.
clawhub install create-cli📖 About This Skill
name: create-cli description: > Design command-line interface parameters and UX: arguments, flags, subcommands, help text, output formats, error messages, exit codes, prompts, config/env precedence, and safe/dry-run behavior. Use when you’re designing a CLI spec (before implementation) or refactoring an existing CLI’s surface area for consistency, composability, and discoverability.
Create CLI
Design CLI surface area (syntax + behavior), human-first, script-friendly.
Do This First
agent-scripts/skills/create-cli/references/cli-guidelines.md and apply it as the default rubric.Clarify (fast)
Ask, then proceed with best-guess defaults if user is unsure:
--json, --plain, exit codes.--no-input? confirmations for destructive ops?Deliverables (what to output)
When designing a CLI, produce a compact spec the user can implement:
--json/--plain; --quiet/--verbose.--dry-run, confirmations, --force, --no-input.Default Conventions (unless user says otherwise)
-h/--help always shows help and ignores other args.--version prints version to stdout.--json for machine output; consider --plain for stable line-based text.--no-input disables prompts.--force or explicit --confirm=....NO_COLOR, TERM=dumb; provide --no-color.Templates (copy into your answer)
CLI spec skeleton
Fill these sections, drop anything irrelevant:
1. Name: mycmd
2. One-liner: ...
3. USAGE:
- mycmd [global flags]
4. Subcommands:
- mycmd init ...
- mycmd run ...
5. Global flags:
- -h, --help
- --version
- -q, --quiet / -v, --verbose (define exactly)
- --json / --plain (if applicable)
6. I/O contract:
- stdout:
- stderr:
7. Exit codes:
- 0 success
- 1 generic failure
- 2 invalid usage (parse/validation)
- (add command-specific codes only when actually useful)
8. Env/config:
- env vars:
- config file path + precedence:
9. Examples:
- …