← ClaudeAtlas

python-engineeringlisted

Modern Python engineering standards and best practices. Use this skill whenever a user wants to: scaffold a Python project, configure tooling (uv, ruff, ty, mypy, structlog, pytest, hypothesis, pydantic-settings, opentelemetry, pip-audit), set up pyproject.toml, src-layout, pre-commit, CI/CD, Docker — for an existing, inherited, or legacy project as much as a greenfield one (assessing and modernizing current setup, not just scaffolding new) — or asks about Python architecture, packaging, testing, type checking, observability, security, async patterns, typing.Protocol, dependency injection, CLAUDE.md, or Cursor rules. Covers hexagonal architecture, functional core/imperative shell, property-based testing, snapshot testing, testcontainers, Trusted Publishers, and Sigstore.
grimaldost/craft-collection · ★ 2 · AI & Automation · score 68
Install: claude install-skill grimaldost/craft-collection
# Modern Python Engineering Standards Apply these standards whenever scaffolding, advising on, or generating Python code and configuration. --- ## Core Philosophy 1. **Ecosystem-First**: Before writing custom logic, evaluate standardized solutions. Custom scripts are liabilities; community tools are assets. 2. **Fail Fast**: Catch errors at startup (typed config) and at commit time (pre-commit hooks), not in production. 3. **src layout is mandatory** — never flat layout for production projects. 4. **Single quotes** for code literals; **double quotes** for docstrings. 5. **Never suggest `pip`, `poetry`, or `virtualenv`** — always `uv`. 6. **Astral-first toolchain**: prefer `uv` + `ruff` + `ty` for the unified, high-performance developer experience. 7. **Protocol-first typing**: prefer `typing.Protocol` (structural subtyping) over ABCs for interfaces. Reserve ABCs for shared implementation only. 8. **Async for I/O-bound services**: reach for `async`/`await` on web services and I/O-bound code — not CPU-bound work or one-shot scripts. Use `asyncio.TaskGroup` over `asyncio.gather()`. 9. **Observable when it runs as a service**: for anything long-running, logging alone is insufficient — instrument with OpenTelemetry traces, metrics, and correlated structured logs. Right-size it; a CLI or one-off script doesn't need distributed tracing. 10. **Secure the supply chain**: pin dependencies with hashes, audit for CVEs in CI, use Trusted Publishers for P