plugins/python-engineering/skills/typer-and-rich/SKILL.md
Use when building or debugging Typer/Rich CLI applications. Activates on Rich table rendering, console output in non-TTY environments, CliRunner testing with Rich output, snapshot testing, Typer command wiring, exception chain prevention with AppExit/AppExitRich patterns, table width at 80-column wrapping, Progress/Live in non-interactive contexts, stderr/stdout separation, or force_terminal vs width configuration. Grounds AI-generated CLI code in verified correctness patterns and prevents known Typer/Rich integration mistakes.
npx skillsauth add jamie-bitflight/claude_skills typer-and-richInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<user_input>$ARGUMENTS</user_input>
If <user_input/> contains a directory or file then that is what should be examined against this guide specifically. Start immediately. If it is empty, then use this as a reference for existing tasks.
Correctness patterns for building CLI applications with Typer and Rich, focused on non-TTY environments and common failure modes. For API reference, load the dedicated skills:
Skill(skill="python-engineering:typer") — Typer CLI framework API reference../python3-cli/references/rich-console-and-markup.md and related Rich referencesConsult python-engineering:python3-core for standing defaults (architecture, typing, testing, CLI rules).
See ../python3-cli/references/typer-rich-non-tty-patterns.md — Console behavior without TTY, width defaults, force_terminal vs width, Progress/Live in non-interactive contexts, environment variables.
See ../python3-cli/references/typer-rich-tables.md — width measurement pattern that prevents wrapping at 80 columns in non-TTY output.
See ../python3-cli/references/typer-rich-testing-patterns.md — capturing Rich output in pytest, CliRunner with Rich, snapshot testing, common assertion mistakes.
See ../python3-cli/references/typer-rich-exception-handling.md — Typer exception chain prevention with AppExit and AppExitRich patterns. Read when implementing error handling in Typer CLI applications.
See ../python3-cli/assets/typer_examples/index.md — working scripts demonstrating non-TTY display solutions. Read when troubleshooting display and layout of terminal applications.
See ../python3-cli/assets/python-cli-demo.py — complete working CLI demo with all patterns (PEP 723 shebang, Typer + Rich integration, modern Python 3.11+, async processing). Read when creating a new CLI tool as a reference implementation.
development
When an application needs to store config, data, cache, or state files. When designing where user-specific files should live. When code writes to ~/.appname or hardcoded home paths. When implementing cross-platform file storage with platformdirs.
testing
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
tools
Reference guide for the Twelve-Factor App methodology — 15 principles (12 original + 3 modern extensions) for building portable, resilient, cloud-native applications. Use when evaluating application architecture, designing cloud-native services, reviewing codebases for methodology compliance, advising on configuration, scaling, observability, security, and deployment patterns. Incorporates the 2025 open-source community evolution and cloud-native reinterpretations of each factor.
tools
Converts user-facing documentation (how-to guides, tutorials, API references, examples) in any format — Markdown, PDF, DOCX, PPTX, XLSX, AsciiDoc, RST, HTML, Jupyter notebooks, man pages, TOML/YAML/JSON configs, and plain text — into Claude Code skill directories with SKILL.md plus thematically grouped references/*.md files. Use when given a docs directory or mixed-format documentation to transform into an AI skill. Uses MCP file-reader server for binary formats.