/engsys-python:python-conventionsfrom engsys-python
Python 3.12+ coding conventions (uv, ruff, pyright/ty strict typing, Pydantic v2, async I/O, and pytest). Use when writing, reviewing, or editing any *.py file or pyproject.toml.
Ships in engsys-python. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Applies to: any *.py file and pyproject.toml in this repository. Target runtime: Python 3.12+.
Naturalize: confirm the virtualenv location (
.venv/), package manager (uv), type checker (pyright/ty/mypy), and test runner (pytest) inCLAUDE.md.
uv + ruff + Typecheck)uv (uv sync, uv run pytest, uv lock) with the project's .venv/. Never install packages into the system Python.ruff check and ruff format --check (4-space indentation, PEP 8 top-level imports — never place import statements inside function bodies unless breaking a documented circular import).pyright or ty (or mypy --strict) before committing.list[str], dict[str, Any], int | None, and type Alias = ... — never legacy typing.List, typing.Dict, or typing.Optional.pydantic.BaseModel (model_validate, model_dump, ConfigDict(extra="forbid", frozen=True)).import math
from pydantic import BaseModel, ConfigDict, Field
class CircleSpec(BaseModel):
"""Validated input specification for circle geometry."""
model_config = ConfigDict(extra="forbid", frozen=True)
radius: float = Field(gt=0, description="Circle radius in meters.")
def calculate_area(spec: CircleSpec) -> float:
"""Return the area of a circle in square meters."""
return math.pi * (spec.radius ** 2)
async def / await end-to-end on async request paths; never block the event loop with synchronous file, network (requests), or database calls.httpx.AsyncClient for HTTP, pymongo.AsyncMongoClient for MongoDB (never EOL motor), and asyncpg / sqlalchemy.ext.asyncio for Postgres.asyncio.TaskGroup for structured fan-out and asyncio.Lock to guard shared in-memory caches against stampedes.pytest)pytest and pytest-asyncio (uv run pytest).0, negative, empty collections, None), and validation rejection (pytest.raises(ValidationError)).rufflist[T], X | None)model_validate, ConfigDict)httpx.AsyncClient, pymongo.AsyncMongoClient)uv run ruff check, typecheck, and uv run pytest pass cleanlyWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub eric-sabe/engsys --plugin engsys-python