Python Best Practices Playbook defines a practical Python repository standard and ships a matching LLM skill for repo review and scaffolding.
Brand: tg12
Site: https://labs.jamessawyer.co.uk/
The current benchmark covers 156 unique public repositories. 138 code-bearing repositories drive the structural baseline. 18 tutorial, resource, and collection repositories are catalogued separately so they do not distort the recommendations.
- A minimal Python package with
src/layout pyproject.tomlas the single project metadata and tool config hub- GitHub Actions CI for lint, type checks, and tests
- A documented Python repository standard derived from a 156-repository benchmark
- A Codex-compatible skill that can audit or scaffold Python repos using those patterns
- A rewritten response-style prompt with obvious AI filler removed
Across the 138-repository structural baseline:
105/138usepyproject.toml125/138expose GitHub Actions workflows77/138usepre-commit81/138expose a dedicatedtests/ortesting/directory88/138expose a rootdocs/directory68/138configure Ruff46/138configure mypy68/138configure pytest inpyproject.toml31/138usesrc/layout30/138usehatchling.build32/138still exposesetuptools.build_meta
The standard pattern is centralized metadata, automated checks, explicit test surfaces, and repository-level documentation. The benchmark does not support the claim that one build backend or one layout has completely won.
.
├── .github/workflows/ci.yml
├── docs/
├── pyproject.toml
├── research/
├── skills/
├── src/
└── tests/
The skill lives in skills/python-best-practices-reviewer/SKILL.md. It is designed for Codex-style skill loading and tells the model when to inspect repo structure, when to prefer small changes, and when to enforce the benchmark-backed patterns that hold up across the atlas.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest
ruff check .
mypy srcPrimary keywords:
- python best practices
- python project template
- python repository standards
- python repo checklist
- python packaging guide
- llm python code review skill
MIT