Agent skill
python-quality-tooling
Use when configuring or running Python quality tools (ruff, ty, pytest, coverage, CI gates) and when enforcing a pre-merge quality checklist.
Install this agent skill to your Project
npx add-skill https://github.com/narumiruna/agent-skills/tree/main/skills/python-quality-tooling
SKILL.md
Python Quality Tooling
Overview
Use ruff, ty, and pytest consistently through uv. Core principle: one repeatable quality gate across local and CI.
Quick Reference
| Task | Command |
|---|---|
| Lint | uv run ruff check |
| Auto-fix | uv run ruff check --fix |
| Format | uv run ruff format |
| Type check | uv run ty check |
| Test | uv run pytest |
| Coverage | uv run pytest --cov=src --cov-report=term-missing |
| Full gate (prek) | prek run -a |
| Install git hooks (prek) | prek install |
Workflow
- Install tools as dev deps (see
python-uv-project-setup). - Run all checks before commit.
- Keep CI aligned with local commands.
- If the repo uses prek, prefer
prek run -aas the single quality gate. - Pytest tests MUST be function-based (no class-based tests or
unittest.TestCase).
Example
Pre-merge gate:
uv run ruff check --fix
uv run ruff format
uv run ty check
uv run pytest --cov=src --cov-report=term-missing
Common Mistakes
- Running tools outside uv (drifts from project env).
- Skipping
prek run -awhen a repo standardizes on prek. - Running only one tool and calling it done.
Red Flags
- Direct
ruff/pytestinvocations withoutuv run. - Mixing
pre-commitandprekcommands in the same repo. - Class-based pytest tests (
class Test*) orunittest.TestCaseusage.
References
references/quality.md- Full command set and CI examplereferences/quality.md- Prek install and usage notes (preferuv tool install prek)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
slide-creator
Use when creating slide decks with Marp/Marpit Markdown (marp), including authoring slide content, designing slide color schemes, and building SVG diagrams or illustrations for the deck.
slide-color-design
Use when you only need slide color systems, palette selection, or palette generation workflows and want direct pointers to the color design references.
mermaid-creator
Use when creating or converting Mermaid diagrams (for example flowcharts, sequence diagrams, ER diagrams, and Gantt charts), including exporting to SVG for docs or slides.
test-driven-development
Use when implementing non-trivial code changes that should follow TDD (write a failing test first, make the smallest passing change, then refactor safely).
svg-illustration
Use when you need SVG diagram rules, layout patterns, or embedding guidance for slide decks and want the minimal SVG-focused reading path.
python-cli-typer
Use when building or structuring Python CLI commands with Typer, including commands, options, and multi-command apps.
Didn't find tool you were looking for?