Language
Python
AI instructions for Python projects — coding rules, agent setup files, and prompts, organized by proficiency.
12 published items · Filter in browse
SQLAlchemy
SQLAlchemy 2.x rules for Python: typed DeclarativeBase models with Mapped, sessions as context managers, select() over Query, selectinload against N+1, bulk ORM inserts, and Alembic migrations.
scikit-learn
scikit-learn rules: pipelines for every preprocessing step, API-compliant custom estimators with validate_data and check_is_fitted, split-before-fit to stop leakage, random_state everywhere, GridSearchCV on the pipeline, check_estimator tests.
pytest
Rules for fast, reliable pytest suites: src layout, test naming, fixture scopes and teardown, parametrize, skip/xfail markers, pytest-mock, pytest-cov, and typed fixtures.
NumPy
NumPy 2.x rules: vectorize and broadcast instead of looping, set dtype explicitly, know views from copies, pre-allocate, type signatures with np.ndarray, pin numpy>=2.0, and compare arrays with numpy.testing.assert_allclose.
Python
Python 3.10+ rules: PEP 8 layout and naming, grouped imports, one docstring style, builtin generic type hints, uv or Poetry environments, src layout with editable installs, pytest with parametrize, and idioms like context managers and enums.
FastAPI
Guidelines for building maintainable, secure FastAPI services: domain-module layout, Annotated dependencies, pydantic-settings, thread-pool offloading, and structured logging.
Python pro subagent (wshobson)
Claude Code subagent (.claude/agents/python-pro.md). Claude Code subagent for modern Python 3.12+: uv, ruff, pydantic, FastAPI, asyncio, typing and production practices.
Python uv + FastAPI CLAUDE.md
CLAUDE.md for a Python 3.12+ FastAPI service managed with uv, tested with pytest, linted with ruff, type-checked with mypy or pyright.
Pydantic AI CLAUDE.md (Python library)
Pydantic AI's real CLAUDE.md/AGENTS.md: contributor philosophy, task-readiness checks, uv workflow, test isolation and coding guidelines for a typed Python library.
Data Science Notebooks CLAUDE.md
CLAUDE.md for a Python data project with notebooks plus a src/ package: never edit output cells, keep notebooks thin, fixed data paths, seeded runs, optional DVC.
PostHog AGENTS.md (Django + React product monorepo)
PostHog's 333-line root AGENTS.md: codebase map, commands, commit/PR and merge-queue rules, public-repo push guidance, CI, security, architecture, code style, copy rules and agent automation.
Apache Airflow AGENTS.md
Apache Airflow's 251-line AGENTS.md: naming rules, Breeze setup, generated commands block, architecture boundaries, security model, coding and testing standards, PR rules, Always/Ask/Never list.