skills/python/SKILL.md
Python guidance for project onboarding, uv, typing, testing, async, configuration, packaging, observability, resilience, resource management, FastAPI conventions, and common debug/build-fix patterns. Load when writing, reviewing, debugging, or maintaining Python code.
npx skillsauth add oornnery/.agents pythonInstall 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.
Policy-level Python guidance. Load one focused ref for deep detail; keep this file as router + defaults.
| Need | Ref |
| ----------------------- | ---------------------------------------- |
| uv, deps, venv, Python | references/uv.md |
| package/module layout | references/structure.md |
| env/settings/secrets | references/config.md |
| packaging/publishing | references/packaging.md |
| style/ruff/naming | references/style.md |
| typing/protocols | references/types.md |
| validation/exceptions | references/errors.md |
| design/SRP/composition | references/design.md |
| anti-pattern review | references/anti-patterns.md |
| asyncio/concurrency | references/async.md |
| jobs/workers/queues | references/jobs.md |
| resources/cleanup | references/resources.md |
| retries/timeouts | references/resilience.md |
| logs/metrics/tracing | references/observability.md |
| profiling/perf | references/perf.md |
| pytest/testing | references/tests.md |
assets/project/pyproject.tomlassets/project/src/myapp/main.pyassets/project/src/myapp/settings.pyassets/project/tests/test_main.pyassets/project/scripts/report.pyDetect:
ls pyproject.toml 2>/dev/null
Before edit:
git log --oneline -10Validation discovery order:
pyproject.tomluv run ...uvrufftypyrightpytestrumdltaskipypre-commitbanditrtkuv run ruff format --check .
uv run ruff check .
uv run rumdl check .
uv run ty check
uv run pyright
uv run pytest -v
Prefer task aliases when repo defines them:
uv run task lint
uv run task fmt
uv run task type
uv run task test
uv run task test-cov
uv run task sec
Verify tools:
uv --version
python --version
uv run ruff --version
uv run ty --version
uv run pyright --version
uv run pytest --version
uv run rumdl --version
uv run task --version
uv run pre-commit --version
uv run bandit --version
Install deps:
uv sync
uv, uv run, uv add; avoid direct pipruffpathlib, f-strings, absolute importsProtocol at boundaries; contain AnyOrder:
After each fix, rerun failing check. Stop/report if fix needs architecture change.
Run uv run task sec for explicit security review; do not treat it as part of the default quick check unless the repo opts in.
Common fixes:
| Tool | Signal | Fix | | ------- | ------------------------ | ------------------------------------ | | ruff | formatting/import/style | format or remove/fix code | | ty | type/import mismatch | fix type, import path, or dependency | | pyright | type/import mismatch | fix type, import path, or dependency | | pytest | assertion/import/fixture | fix logic, path, or fixture |
git log --oneline -10 and git diffgit bisect if regression likelyRules: do not guess first; fix root cause; one hypothesis at time; do not silence with broad try/except; do not change tests to match bug.
Annotated for Path, Query, Header, Depends... for required FastAPI/Pydantic fieldsresponse_modelprefix, tags, dependenciesdef if internals may blockORJSONResponse/UJSONResponse performance crutchRootModel when normal typed structure is enoughSkip style already enforced by tools.
designarchqualitydevelopment
--- name: verification description: Discover and run project validation gates: format, lint, typecheck, LSP diagnostics, tests, build, static security checks, dependency audits, and RTK output handling. Use before claiming work is complete, when fixing broken checks, or when setting up a validation plan. --- # Verification Use this skill to prove changes with the strongest practical checks the repo already supports. ## Discovery Order 1. Read task aliases: `package.json`, `pyproject.toml`, `
tools
Build, review, or validate standalone Python scripts run with uv inline metadata. Use for one-file automation, operational scripts, script dependencies, shebangs, idempotency, safety, representative runs, and promoting scripts to packages.
development
Build, review, or validate Python packages and libraries where public API stability, packaging metadata, imports, examples, changelogs, build output, and compatibility matter.
tools
Build, review, or validate Python command-line applications and terminal tools. Use for argparse, Typer, Rich, Textual-adjacent CLI UX, stdout/stderr contracts, exit codes, automation-friendly flags, help output, and CLI tests.