← ClaudeAtlas

python-stylelisted

Python coding conventions: uv commands (sync/add/run), pytest, ruff, ty, pytest-mock with autospec, src/ layout, dataclass Value Objects (frozen=True, slots=True), naming, imports, docstrings. Load whenever writing, reviewing, refactoring, linting, typechecking, testing, or PLANNING Python code — even in plan mode, before any code exists. Also load for Python test environment discussions such as pytest, uv run --with pytest, ruff, or ty. Do NOT use for project bootstrap (`uv init`, flake.nix, initial `pyproject.toml` scaffolding) — that is `nix-dev-init`'s job. Without this skill, Claude or Codex falls back to pip, unittest.mock, and wrong class patterns this user rejects.
furedea/agent-harness · ★ 1 · Code & Development · score 67
Install: claude install-skill furedea/agent-harness
# Python Coding Style Guidelines ## Scope This skill governs **code written inside an already-bootstrapped Python project** — class design, test authoring, refactoring, code review, naming, imports, docstrings. Project bootstrap (flake.nix, direnv, `uv init`, initial `pyproject.toml` merge) belongs to the `nix-dev-init` skill. If the project is not yet bootstrapped, defer to `nix-dev-init` first and return here once `direnv allow` succeeds and the shell has `uv` on PATH. ### Why the split Keeping bootstrap out of this skill has two benefits: (1) when Claude is triggered to write or refactor Python code in an existing project, it does not read a long bootstrap procedure it does not need; (2) the nix `flake.nix` → `direnv` → `uv init` → `pyproject.toml` ordering is an invariant owned by `nix-dev-init` — duplicating a shortcut here would let it drift. ## Package Management - Use only `uv` for package management, don't use `pip` - Install dependencies using `uv sync` - Run tools using `uv run {tool}` - Baseline tooling dependencies belong in template-defined dependency groups, not ad hoc commands - Add project-specific dependencies using `uv add {package}` - Add project-specific tool dependencies using `uv add --group <group> {package}` - Upgrade pinned packages using `uv lock --upgrade-package {package}` - Prohibited: `uv pip install`, `uv add --dev`, `@latest` ## Directory Structure - Store production code including entry points in `./src` directory - Store test code i