python-cli-typer

python-cli-typer is a skill for Claude Code, Codex from vikasudasi/skill-vault. It costs 34 tokens per session (509 once invoked), scanned A, original, Apache-2.0.

A guide to building Python command-line tools with Typer or Click. Command-line tools are programs users run from a terminal; this covers commands, options, environment settings, exit codes, and tests.

In plain words
What is it for?
Use it when creating or extending a Python CLI with subcommands, configuration from environment variables, defined exit codes, or in-process tests.
Why use it?
It helps give terminal programs predictable arguments, useful help text, clear failure signals, and an entry point that can be tested without starting another process.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or extending a Python CLI with subcommands, configuration from environment variables, defined exit codes, or in-process tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vikasudasi/skill-vault/python-cli-typer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vikasudasi/skill-vault --skill python-cli-typer
Clone the repo
git clone --depth 1 https://github.com/vikasudasi/skill-vault

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-cli-typer

README.md
[![agentmods](https://agentmods.dev/badge/skills/vikasudasi/skill-vault/python-cli-typer/github.svg)](https://agentmods.dev/skills/vikasudasi/skill-vault/python-cli-typer)
Your own site
<a href="https://agentmods.dev/skills/vikasudasi/skill-vault/python-cli-typer"><img src="https://agentmods.dev/badge/skills/vikasudasi/skill-vault/python-cli-typer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-cli-typer

Your own site · 80×15
<a href="https://agentmods.dev/skills/vikasudasi/skill-vault/python-cli-typer"><img src="https://agentmods.dev/badge/skills/vikasudasi/skill-vault/python-cli-typer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 509 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00509
Opus 5.5 $0.00014 $0.00204
Sonnet 5.5 $0.00007 $0.00102
Haiku 4.5 $0.00003 $0.00051

Measured 1mo ago against content hash 11ab62596fcb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-cli-typer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/demo_cli.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill_vault/data/skills/python-cli-typer/SKILL.md · 68 lines

What it actually says

Building Python CLIs with Typer

Use when scaffoldng or extending a Python command-line tool and you want a maintainable argument surface, clean help, and a testable entrypoint.

Scaffold

from __future__ import annotations

import typer

app = typer.Typer(add_completion=False)


@app.command()
def scan(path: str, recursive: bool = typer.Option(False, "--recursive", "-r")) -> None:
    """Scan a directory."""
    ...


if __name__ == "__main__":
    app()

Conventions that matter

  • Use --flag for booleans, --opt VALUE for options; put required positional args first. Never mix a required option with a positional that can be omitted.
  • Read config from env with a small settings dataclass instead of scattering os.getenv through commands (mirrors Skill Vault's get_settings).
  • Exit codes: 0 success, 1 runtime/API error, 2 invalid args (click does this by default), 3 "no valid results". Raise a typed exception and map it in a top-level handler rather than sys.exit inline.

Testing

Expose a main(argv: list[str]) -> None that calls app(args=argv, standalone_mode=False). This lets you invoke commands in-process without spawning a process.

from cli import main


def test_scan_ok():
    with pytest.raises(SystemExit) as e:
        main(["scan", "src"])
    # assert stdout via capsys

Pitfalls

  • Typer's --help is auto-generated — keep docstrings accurate, they become help.
  • For streaming/progress use rich (Typer integrates via rich.markup), not print.
  • Don't make the CLI print secrets or API keys on the happy path.
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 68 lines · 34 tokens per session scan A 11ab62596fcb

Subscribe to this mod's changes

python-cli-typer is a skill published in the GitHub repository vikasudasi/skill-vault (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 34 tokens to every session and 509 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cli-tool-design

Design command-line interfaces with clear argument parsing, subcommands, help text, output formatting, and exit codes. Covers Click, Typer, argparse, and shell completion. Triggers on CLI tool development, argument parsing, or terminal UX design requests.

organvm-iv-taxis/a-i--skills · 54 tokens

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…

synthetic-sciences/openscience · 76 tokens

python-repl

Interactive Python REPL automation with common helpers and best practices.

gptme/gptme · 15 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

modern-python-toolchain

Modern Python project setup with uv, ruff, and pyright. Use when initializing a new Python project, configuring the Python environment, setting up linting/formatting, or when a project needs uv (the fast Python package manager). Trigger on: 'set up Python', 'new Python project', 'configure uv', 'install uv', 'ruff'…

XiaomiMiMo/MiMo-Code · 105 tokens