adding-cli-command
Provides Typer templates, handles registration, and ensures consistency. ALWAYS use this skill when adding or modifying CLI…
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
$ npx -y skills add https-deeplearning-ai/sc-agent-skills-files --skill reviewing-cli-command --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/reviewing-cli-commandContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: reviewing-cli-command description: 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.
Checklist for reviewing Typer CLI command implementations.
1. Read the command file 2. Check each section below 3. Report findings using output format at bottom
# 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.")# 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# GOOD:
display.success(f"Added '{task.title}'")
# BAD:
print(f"Added '{task.title}'")# 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)| 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: <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>
Provides Typer templates, handles registration, and ensures consistency. ALWAYS use this skill when adding or modifying CLI…
Generate pytest tests for Typer CLI commands. Includes fixtures (temp_storage, sample_data), CliRunner patterns, confirmation…
Create learning paths for programming tools, and define what information should be researched to create learning guides. Use when…