dev-cli-consistency-audit
Original:🇺🇸 English
Translated
Reviews a CLI tool's command interface for consistency in argument naming, flag conventions, help text, and README alignment. Use when building CLI tools or before releasing CLI updates. Triggers: "review CLI arguments", "align CLI conventions", "CLI consistency check", "make sure commands are aligned", "review command interface".
10installs
Sourcejackchuka/skills
Added on
NPX Install
npx skill4agent add jackchuka/skills dev-cli-consistency-auditTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →CLI Consistency Review
Systematic review of a CLI tool's command interface to ensure consistent naming, conventions, and documentation alignment.
Workflow
Step 1: Inventory Commands
- Run the CLI with or
--helpto get the top-level command list-h - For each subcommand, run to get its full interface
<cmd> <subcmd> --help - Build an inventory table:
| Command | Positional Args | Flags | Output Formats |
|---------------|------------------|--------------------|----------------|
| pull | owner/repo | --issues, --prs | table, json |
| search | [query] | --type, --limit | fzf |
| prune | owner/repo | --confirm, --dry-run| table |Step 2: Convention Analysis
Check for consistency across all commands:
-
Positional vs Flag arguments:
- Is the same concept (e.g., ) passed as positional in some commands and as
owner/repoflag in others?--repo - Recommendation: Pick one approach and apply everywhere
- Is the same concept (e.g.,
-
Flag naming:
- Are similar concepts named consistently? (e.g., vs
--outputvs--format)-o - Do boolean flags follow the same pattern? (vs
--dry-runvs--confirm)--yes - Are shorthand flags (,
-f) assigned consistently?-o
- Are similar concepts named consistently? (e.g.,
-
Pluralization:
- Subcommand names: singular vs plural (e.g., vs
list files)list file - Flag names: vs
--issue--issues
- Subcommand names: singular vs plural (e.g.,
-
Default behaviors:
- Are defaults consistent? (e.g., if one command defaults to , do others?)
--format=table - Are destructive commands safe by default? (require or
--confirm)--force
- Are defaults consistent? (e.g., if one command defaults to
-
Error messages:
- Do error messages follow a consistent format?
- Are they actionable (tell the user what to do)?
Step 3: Documentation Alignment
-
Compare the README documentation with actualoutput:
--help- Are all commands documented?
- Do the documented flags match the actual implementation?
- Are examples up to date and runnable?
-
Check help text quality:
- Does each command have a one-line description?
- Are flag descriptions clear and consistent in style?
- Do examples in text work?
--help
Step 4: Report
Present findings:
CLI Consistency Review:
Inconsistencies Found:
1. [Issue] — [Commands affected] — [Suggested fix]
2. ...
Documentation Gaps:
1. [What's missing] — [Where]
2. ...
Recommendations:
1. [Convention to adopt] — [Rationale]
2. ...Step 5: Apply Fixes
For each accepted fix:
- Update the command implementation (flag names, defaults, etc.)
- Update help text and descriptions
- Update README to match
- Run again to verify alignment
--help
Best Practices Reference
- Positional arguments: Use for the primary subject (e.g., ). Limit to 1-2 positional args.
owner/repo - Flags: Use for modifiers and options. Always provide ; add
--long-formshorthand only for frequently used flags.-s - Boolean flags: Use to enable (default off). For "default on" behaviors, use
--flagto disable.--no-flag - Output format: If supporting multiple formats, use consistently.
--format=table|json|yaml - Destructive operations: Default to dry-run or require explicit .
--confirm - Verbosity: Use /
--verboseconsistently. Consider-v/--quietas well.-q
Examples
Example 1: Full CLI review
User: "review our cli arguments and make sure they are aligned"
Action:
1. Run --help for all commands
2. Build inventory table
3. Identify naming inconsistencies
4. Check README alignment
5. Present report with specific fixesExample 2: Pre-release check
User: "make sure our command implementation and comments are aligned"
Action:
1. Compare help text with actual behavior
2. Verify README examples work
3. Check for undocumented flags
4. Update docs to match implementation