TSH Stack: Python
tsh-stack-python carries TSH's conventions for modern Python 3.12+: general implementation and review practices, and data modelling with Pydantic v2, dataclasses, SQLModel and SQLAlchemy 2.0.
Who installs it and where
Install it at project scope, into the projects that run on Python, so it travels with the repository: the repository already knows what it runs on. Your discipline plugin (for example tsh-product-engineering) and tsh-core travel with you at user scope. The install commands live on the installation page, which renders the repository README, so they are not repeated here.
Once installed, skills are invoked as /tsh-stack-python:<skill>. Release notes are on the changelog page.
What it ships
| Skill | Invoke | What it does |
|---|---|---|
| writing-data-models | /tsh-stack-python:writing-data-models | Governs implementation and review of Python data modeling with Pydantic v2, dataclasses, SQLModel, SQLAlchemy 2.0 bridging, serialization, and immutability and performance constraints. Use when working with Pydantic BaseModel, dataclass, SQLModel (table=True/False), domain boundaries, pydantic-settings, TypeAdapter, or model_construct. |
| writing-modern-python | /tsh-stack-python:writing-modern-python | Guides implementation and review of general modern Python 3.12+ code. Activate for Python typing, PEP 695 generics, structural typing, module layout, control flow (comprehensions, walrus, 3.12 f-strings), asyncio and TaskGroup, exception handling, pathlib, logging, pytest, or uv/Ruff/ty workflows. |
Both skills are model-invocable: Claude loads them when the work matches their description, so you do not have to type the command.
The two are designed to work together. writing-modern-python delegates dataclass, Pydantic, ORM and serialization decisions to writing-data-models and links to it directly. Because they ship in the same plugin, that link always resolves.
Scope
The routing question for this plugin is whether the guidance would change if the project switched language or framework. If yes, it belongs here. If it would change when the reader switched job, it belongs in a discipline plugin instead.
MCP servers, hooks and agents
This plugin ships no agents, no .mcp.json and no hooks.
Not covered yet
The plugin README lists these gaps as deliberate scope:
- Pandas: DataFrame manipulation, dtypes and vectorized workflows have no skill of their own yet.
- Pandera: DataFrame schema validation has no skill of its own yet.
- Web framework guidance: FastAPI, Django and Flask have no skill of their own.
writing-data-modelscovers the Pydantic and SQLModel layer underneath them.