Install any skill in seconds. Free to start, no credit card required.
Get Started Free →CLI application patterns for Python. Triggers on: cli, command line, typer, click, argparse, terminal, rich, console, terminal ui.
.claude/skills/aiskillstore-python-cli-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 19% | 0% |
Modern CLI development with Typer and Rich.
pythonimport typer app = typer.Typer( name="myapp", help="My awesome CLI application", add_completion=True, ) @app.command() def hello( name: str = typer.Argument(..., help="Name to greet"), count: int = typer.Option(1, "--count", "-c", help="Times to greet"), loud: bool = typer.Option(False, "--loud", "-l", help="Uppercase"), ): """Say hello to someone.""" message = f"Hello, {name}!" if loud: message = message.upper() for _ in range(count): typer.echo(message) if __name__ == "__main__": app()
pythonimport typer app = typer.Typer() users_app = typer.Typer(help="User management commands") app.add_typer(users_app, name="users") @users_app.command("list") def list_users(): """List all users.""" typer.echo("Listing users...") @users_app.command("create") def create_user(name: str, email: str): """Create a new user.""" typer.echo(f"Creating user: {name} <{email}>") @app.command() def version(): """Show version.""" typer.echo("1.0.0") # Usage: myapp users list # myapp users create "John" "john@example.com" # myapp version
pythonfrom rich.console import Console from rich.table import Table from rich.progress import track from rich.panel import Panel import typer console = Console() @app.command() def show_users(): """Display users in a table.""" table = Table(title="Users") table.add_column("ID", style="cyan") table.add_column("Name", style="green") table.add_column("Email") users = [ (1, "Alice", "alice@example.com"), (2, "Bob", "bob@example.com"), ] for id, name, email in users: table.add_row(str(id), name, email) console.print(table) @app.command() def process(): """Process items with progress bar.""" items = list(range(100)) for item in track(items, description="Processing..."): do_something(item) console.print("[green]Done![/green]")
pythonimport typer from rich.console import Console console = Console() def error(message: str, code: int = 1): """Print error and exit.""" console.print(f"[red]Error:[/red] {message}") raise typer.Exit(code) @app.command() def process(file: str): """Process a file.""" if not os.path.exists(file): error(f"File not found: {file}") try: result = process_file(file) console.print(f"[green]Success:[/green] {result}") except ValueError as e: error(str(e))
| Feature | Typer Syntax | |---------|--------------| | Required arg | name: str | | Optional arg | name: str = "default" | | Option | typer.Option(default, "--flag", "-f") | | Argument | typer.Argument(..., help="...") | | Boolean flag | verbose: bool = False | | Enum choice | color: Color = Color.red |
| Rich Feature | Usage | |--------------|-------| | Table | Table() + add_column/row | | Progress | track(items) | | Colors | [red]text[/red] | | Panel | Panel("content", title="Title") |
./references/typer-patterns.md - Advanced Typer patterns./references/rich-output.md - Rich tables, progress, formatting./references/configuration.md - Config files, environment variables./assets/cli-template.py - Full CLI application templateRelated Skills:
python-typing-patterns - Type hints for CLI argumentspython-observability-patterns - Logging for CLI applicationsComplementary Skills:
python-env - Package CLI for distribution| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 9,230 | 5,731 | -38% | 1 | 1 | 0% | 1,867 | 2,220 | +19% | 0 | 0 | — |
case-02 | fail→pass | 13,474 | 8,247 | -39% | 1 | 1 | 0% | 2,587 | 2,667 | +3% | 0 | 0 | — |
case-03 | fail→pass | 13,789 | 11,903 | -14% | 1 | 1 | 0% | 2,678 | 3,512 | +31% | 0 | 0 | — |
case-16 | pass→pass | 8,203 | 3,597 | -56% | 1 | 1 | 0% | 1,433 | 1,619 | +13% | 0 | 0 | — |
case-04 | pass→pass | 16,521 | 8,592 | -48% | 1 | 1 | 0% | 2,429 | 2,478 | +2% | 0 | 0 | — |
case-05 | pass→pass | 11,313 | 7,593 | -33% | 1 | 1 | 0% | 1,958 | 2,441 | +25% | 0 | 0 | — |
case-06 | fail→pass | 6,975 | 3,732 | -46% | 1 | 1 | 0% | 1,197 | 1,785 | +49% | 0 | 0 | — |
case-07 | pass→pass | 11,475 | 6,034 | -47% | 1 | 1 | 0% | 2,280 | 2,238 | -2% | 0 | 0 | — |
case-08 | pass→pass | 9,596 | 4,045 | -58% | 1 | 1 | 0% | 1,567 | 1,759 | +12% | 0 | 0 | — |
case-09 | pass→pass | 8,959 | 6,308 | -30% | 1 | 1 | 0% | 1,666 | 2,167 | +30% | 0 | 0 | — |
case-10 | pass→pass | 10,595 | 5,034 | -52% | 1 | 1 | 0% | 1,811 | 1,917 | +6% | 0 | 0 | — |
case-11 | pass→pass | 5,248 | 3,845 | -27% | 1 | 1 | 0% | 846 | 1,734 | +105% | 0 | 0 | — |
case-12 | pass→pass | 5,630 | 3,672 | -35% | 1 | 1 | 0% | 1,080 | 1,701 | +57% | 0 | 0 | — |
case-13 | fail→pass | 11,003 | 4,091 | -63% | 1 | 1 | 0% | 1,986 | 1,845 | -7% | 0 | 0 | — |
case-14 | pass→pass | 21,890 | 3,649 | -83% | 1 | 1 | 0% | 1,179 | 1,667 | +41% | 0 | 0 | — |
case-15 | pass→pass | 7,881 | 4,352 | -45% | 1 | 1 | 0% | 1,552 | 1,848 | +19% | 0 | 0 | — |
case-17 | pass→pass | 9,005 | 4,567 | -49% | 1 | 1 | 0% | 1,522 | 1,853 | +22% | 0 | 0 | — |
case-18 | pass→pass | 11,266 | 5,714 | -49% | 1 | 1 | 0% | 2,099 | 2,152 | +3% | 0 | 0 | — |
case-19 | pass→pass | 5,173 | 5,644 | +9% | 1 | 1 | 0% | 1,042 | 2,146 | +106% | 0 | 0 | — |
case-20 | pass→pass | 6,567 | 4,814 | -27% | 1 | 1 | 0% | 1,111 | 1,971 | +77% | 0 | 0 | — |
case-21 | pass→pass | 6,899 | 5,759 | -17% | 1 | 1 | 0% | 1,266 | 2,112 | +67% | 0 | 0 | — |
case-22 | pass→pass | 9,288 | 7,301 | -21% | 1 | 1 | 0% | 1,601 | 2,378 | +49% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.