reviewing-cli-command

Provides checklist for reviewing Typer CLI command implementations. Covers structure, Annotated syntax, error handling, exit codes, display module usage, destructive action patterns, and help text conventions. Use when user asks to review/check/verify a CLI command, wants feedback on implementation, or asks if a command follows best practices.

25 stars

Best use case

reviewing-cli-command is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Provides checklist for reviewing Typer CLI command implementations. Covers structure, Annotated syntax, error handling, exit codes, display module usage, destructive action patterns, and help text conventions. Use when user asks to review/check/verify a CLI command, wants feedback on implementation, or asks if a command follows best practices.

Teams using reviewing-cli-command should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/reviewing-cli-command/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/https-deeplearning-ai/sc-agent-skills-files/reviewing-cli-command/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/reviewing-cli-command/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How reviewing-cli-command Compares

Feature / Agentreviewing-cli-commandStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Provides checklist for reviewing Typer CLI command implementations. Covers structure, Annotated syntax, error handling, exit codes, display module usage, destructive action patterns, and help text conventions. Use when user asks to review/check/verify a CLI command, wants feedback on implementation, or asks if a command follows best practices.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Reviewing CLI Commands

Checklist for reviewing Typer CLI command implementations.

## Review Process

1. Read the command file
2. Check each section below
3. Report findings using output format at bottom

## Structure

- [ ] File in `src/<cli_app>/commands/`
- [ ] Has `app = typer.Typer()` and `@app.command()`
- [ ] Command groups use `@app.command()` for each subcommand
- [ ] Registered in `commands/__init__.py` with `add_typer()`
- [ ] Single commands: `add_typer(app)` without name
- [ ] Command groups: `add_typer(app, name="group")`

## Arguments & Options

- [ ] Uses `Annotated` syntax
- [ ] Arguments for required positional input
- [ ] Options for optional named parameters
- [ ] Short flags where appropriate (`-f`, `-q`)
- [ ] Help text: lowercase, no period, brief

```python
# GOOD:
name: Annotated[str, typer.Argument(help="item name")]
force: Annotated[bool, typer.Option("--force", "-f", help="skip confirmation")] = False

# BAD:
name: str = typer.Argument(..., help="The name of the item.")
```

## Error Handling

- [ ] Validates input before processing
- [ ] Exit codes: 0=success, 1=error, 2=invalid input
- [ ] Errors via `display.error()`
- [ ] Uses `raise typer.Exit(code)` after errors
- [ ] Uses `raise typer.Abort()` for cancellation

```python
# GOOD:
if id < 1:
    display.error("ID must be positive")
    raise typer.Exit(EXIT_INVALID_INPUT)

# BAD:
if id < 1:
    print("Error: ID must be positive")
    return
```

## Output

- [ ] All output through `display` module
- [ ] No `print()`, `typer.echo()`, or `console.print()`

```python
# GOOD:
display.success(f"Added '{task.title}'")

# BAD:
print(f"Added '{task.title}'")
```

## Destructive Actions

- [ ] Has `--force` / `-f` flag
- [ ] `typer.confirm()` with `default=False`
- [ ] Shows "Cancelled" on abort

```python
# GOOD:
if not force:
    confirm = typer.confirm(f"Delete '{task.title}'?", default=False)
    if not confirm:
        display.info("Cancelled")
        raise typer.Abort()

# BAD: defaults to Yes
confirm = typer.confirm(f"Delete?", default=True)
```

## Help Text

- [ ] Docstring exists
- [ ] Imperative mood ("Add a task" not "Adds a task")
- [ ] First line < 60 characters

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| `print()` | `display.success/error/warning/info()` |
| Wrong exit code | 0=success, 1=error, 2=invalid |
| Missing `--force` on delete | Add force option with default False |
| Confirmation defaults Yes | `default=False` in `typer.confirm()` |
| Old Typer syntax | `Annotated[type, typer.Argument()]` |
| Missing `app = typer.Typer()` | Each command file needs its own app |
| Not registered | `add_typer(app)` in `commands/__init__.py` |

## Review Output Format

```
## Review: <command_name>

[OK] Uses Annotated syntax
[OK] Has docstring in imperative mood
[X] Missing --force flag on destructive command
[X] Uses print() instead of display module
[!] Help text could be shorter

### Summary
<brief summary of issues found>

### Suggested Fixes
<code suggestions if needed>
```

Related Skills

linux-commands-guide

25
from ComeOnOliver/skillshub

Linux Commands Guide - Auto-activating skill for DevOps Basics. Triggers on: linux commands guide, linux commands guide Part of the DevOps Basics skill category.

adding-cli-command

25
from ComeOnOliver/skillshub

Provides Typer templates, handles registration, and ensures consistency. ALWAYS use this skill when adding or modifying CLI commands. Use when user requests to add/create/implement/build/write a new command (e.g., "add edit command", "create search feature") OR update/modify/change/edit an existing command.

vscode-ext-commands

25
from ComeOnOliver/skillshub

Guidelines for contributing commands in VS Code extensions. Indicates naming convention, visibility, localization and other relevant attributes, following VS Code extension development guidelines, libraries and good practices

reviewing-oracle-to-postgres-migration

25
from ComeOnOliver/skillshub

Identifies Oracle-to-PostgreSQL migration risks by cross-referencing code against known behavioral differences (empty strings, refcursors, type coercion, sorting, timestamps, concurrent transactions, etc.). Use when planning a database migration, reviewing migration artifacts, or validating that integration tests cover Oracle/PostgreSQL differences.

running-dbt-commands

25
from ComeOnOliver/skillshub

Formats and executes dbt CLI commands, selects the correct dbt executable, and structures command parameters. Use when running models, tests, builds, compiles, or show queries via dbt CLI. Use when unsure which dbt executable to use or how to format command parameters.

../../../engineering-team/incident-commander/SKILL.md

25
from ComeOnOliver/skillshub

No description provided.

command-creator

25
from ComeOnOliver/skillshub

This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash command", "add a command", or want to document a workflow as a reusable command. Essential for creating optimized, agent-executable slash commands with proper structure and best practices.

pentest-commands

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "run pentest commands", "scan with nmap", "use metasploit exploits", "crack passwords with hydra or john", "scan web vulnerabilities with nikto", "enumerate networks", or needs essential penetration testing command references.

command-management

25
from ComeOnOliver/skillshub

Use PROACTIVELY this skill when you need to create or update custom commands following best practices

when-reviewing-pull-request-orchestrate-comprehensive-code-revie

25
from ComeOnOliver/skillshub

Use when conducting comprehensive code review for pull requests across multiple quality dimensions. Orchestrates 12-15 specialized reviewer agents across 4 phases using star topology coordination. Covers automated checks, parallel specialized reviews (quality, security, performance, architecture, documentation), integration analysis, and final merge recommendation in a 4-hour workflow.

when-reviewing-github-pr-use-github-code-review

25
from ComeOnOliver/skillshub

Comprehensive GitHub pull request code review using multi-agent swarm with specialized reviewers for security, performance, style, tests, and documentation. Coordinates security-auditor, perf-analyzer, code-analyzer, tester, and reviewer agents through mesh topology for parallel analysis. Provides detailed feedback with auto-fix suggestions and merge readiness assessment. Use when reviewing PRs, conducting code audits, or ensuring code quality standards before merge.

when-reviewing-code-comprehensively-use-code-review-assistant

25
from ComeOnOliver/skillshub

Comprehensive PR review with multi-agent swarm specialization for security, performance, style, tests, and documentation