| name | python-audit |
| description | Use when reviewing Python code quality — run ruff, check types, verify tests, flag common issues. Trigger on "audit", "code quality", "lint", "check code". |
Python Audit
Quick quality check for Python projects. Run the automated tools, flag what they miss.
Steps
1. Run automated checks
uv run ruff check <package>/ tests/
uv run ruff format --check <package>/ tests/
uv run pytest tests/ -q
uv run mypy <package>/
uv run bandit -r <package>/ -q
Fix any failures before proceeding. If ruff has auto-fixable issues, run ruff check --fix.
2. Manual review checklist
After automated tools pass, check these (tools can't catch them):
Error handling:
Design:
Types:
Tests:
Concurrency:
Security (beyond bandit):
3. Report
For each finding: file, line, what's wrong, suggested fix, priority (High/Medium/Low).
Group by: automated tool failures first, then manual findings.