Skip to content
cccskills
FreePublished on GitHub

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.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md3.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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
# 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
# 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()
# 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
# 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

MistakeFix
print()display.success/error/warning/info()
Wrong exit code0=success, 1=error, 2=invalid
Missing --force on deleteAdd force option with default False
Confirmation defaults Yesdefault=False in typer.confirm()
Old Typer syntaxAnnotated[type, typer.Argument()]
Missing app = typer.Typer()Each command file needs its own app
Not registeredadd_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>

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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.

The English summary is being prepared. Showing the original description.

https-deeplearning-ai/sc-agent-skills-files1.4KUpdated Jun 9, 2026

Analyze weekly marketing campaign performance data across channels. Use when analyzing multi-channel digital marketing data to calculate funnel metrics (CTR, CVR) and compare to benchmarks, compute cost and revenue efficiency metrics (ROAS, CPA, Net Profit), or get budget reallocation recommendations based on performance rules.

The English summary is being prepared. Showing the original description.

https-deeplearning-ai/sc-agent-skills-files1.4KUpdated Jun 9, 2026

Comprehensive diagnostic analysis of time series data. Use when users provide CSV time series data and want to understand its characteristics before forecasting - stationarity, seasonality, trend, forecastability, and transform recommendations.

The English summary is being prepared. Showing the original description.

https-deeplearning-ai/sc-agent-skills-files1.4KUpdated Jun 9, 2026

CraftedWell brand guidelines for presentations and documents. Use this skill whenever creating or styling documents (docx, pdf) or presentations (pptx) for CraftedWell. Apply warm, artisanal aesthetic with chocolate/caramel color palette, Georgia headings, and Arial body text.

The English summary is being prepared. Showing the original description.

https-deeplearning-ai/sc-agent-skills-files1.4KUpdated Jun 9, 2026

Generate pytest tests for Typer CLI commands. Includes fixtures (temp_storage, sample_data), CliRunner patterns, confirmation handling (y/n/--force), and edge case coverage. Use when user asks to "write tests for", "test my CLI", "add test coverage", or any CLI + test request.

The English summary is being prepared. Showing the original description.

https-deeplearning-ai/sc-agent-skills-files1.4KUpdated Jun 9, 2026

Generate educational practice questions from lecture notes to test student understanding. Use when users request practice questions, exam preparation materials, study guides, or assessment items based on lecture content.

The English summary is being prepared. Showing the original description.

https-deeplearning-ai/sc-agent-skills-files1.4KUpdated Jun 9, 2026

See all skills by https-deeplearning-ai

Report a problem with this skill