python-standards
/python-standards
Python coding standards for modern (3.11+) projects - strict typing, ruff/mypy config, uv packaging, pytest testing, async patterns, error handling, security, docstrings, Docker, and FastAPI/Pydantic/SQLAlchemy/Django/Flask conventions. Use this skill whenever the user writes, reviews, refactors, scaffolds or configures Python code or a Python project (pyproject.toml, ruff, mypy, uv, pytest, Dockerfile for Python, type hints, docstrings, asyncio, logging), or asks what the "standard" or "best practice" is for Python, even if they don't mention standards explicitly.
- Author
- sydasif ↗
- Repository
- claude-python-standards ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 16
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Python coding standards for modern (3.11+) projects - strict typing, ruff/mypy config, uv packaging, pytest testing, async patterns, error handling, security, docstrings, Docker, and FastAPI/Pydantic/SQLAlchemy/Django/Flask conventions. Use this skill whenever the user writes, reviews, refactors, scaffolds or configures Python code or a Python project (pyproject.toml, ruff, mypy, uv, pytest, Dockerfile for Python, type hints, docstrings, asyncio, logging), or asks what the "standard" or "best practice" is for Python, even if they don't mention standards explicitly.
Triggers from the description
Original author description
Python coding standards for modern (3.11+) projects - strict typing, ruff/mypy config, uv packaging, pytest testing, async patterns, error handling, security, docstrings, Docker, and FastAPI/Pydantic/SQLAlchemy/Django/Flask conventions. Use this skill whenever the user writes, reviews, refactors, scaffolds or configures Python code or a Python project (pyproject.toml, ruff, mypy, uv, pytest, Dockerfile for Python, type hints, docstrings, asyncio, logging), or asks what the "standard" or "best practice" is for Python, even if they don't mention standards explicitly.
How it works
- How to use
- Core defaults (always in force)
- Preferences (opt-in, owned by their own skills)
- Which reference to read
- Single sources of truth
SKILL.md preview
--- name: python-standards description: Python coding standards for modern (3.11+) projects - strict typing, ruff/mypy config, uv packaging, pytest testing, async patterns, error handling, security, docstrings, Docker, and FastAPI/Pydantic/SQLAlchemy/Django/Flask conventions. Use this skill whenever the user writes, reviews, refactors, scaffolds or configures Python code or a Python project (pyproject.toml, ruff, mypy, uv, pytest, Dockerfile for Python, type hints, docstrings, asyncio, logging), or asks what the "standard" or "best practice" is for Python, even if they don't mention standards explicitly. --- # Python Standards House rules for writing Python. The rules are split into focused reference files so you load only what the task needs. Following them keeps new code consistent with the rest of the codebase and avoids re-deciding the same questions (typing strictness, tooling, error handling) on every task. ## How to use 1. Read `references/index.md` once: each topic has exactly one owning file, so it tells you where a rule lives. 2. Read only the reference file(s) matching the task (table below). For a review or broad refactor, start with `core/conventions.md`, then add the files for the areas the code touches. 3. Apply the rules. When existing project code conflicts with them, follow the project's established style unless the user asks for a migration, and mention the difference briefly. 4. For a one-off script or a legacy codebase (3.8-, untyped), use judgment instead of full strictness; the conventions file explains the tradeoff. ## Core defaults (always in force) - Python 3.11+ floor, 3.12 target; type hints on every signature; `X | Y` unions. - `uv` for environments and dependencies, `ruff` for lint and format, `mypy --strict`, `pytest`. - Specific exceptions only, `raise ... from`, no bare `except`; no hardcoded secrets; `pathlib`, `subprocess.run`, lazy logging, no `print()` in libraries. These defaults are what the code-quality passes enforce: `cleanup-code` prunes first, `modernize-python` applies the mechanical syntax and typing rules, and `review-code` is the final gate. ## Preferences (opt-in, owned by their own skills) Not house rules. Apply them when the task calls for them: - **Function-first / functional core** — plain functions over classes, pure logic separated from I/O: owned by `function-first-refactor`. The rationale, the scope where it is justified, and the refactoring process live there; the short form is in [`references/core/conventions.md#function-first-design`](references/core/conventions.md#function-first-design). ## Which reference to read `references/index.md` is the **only** task → file map. Read it, then open only the file(s) the task needs — do not scan this folder for the right file. ## Single sources of truth - The `pyproject.toml` / `[tool.ruff]` configuration lives only in `references/core/conventions.md` (Canonical tool configuration). Copy it from there; do not invent a second config. - Before/after code examples live only in `references/core/conventions-examples.md`. When asked to add or change an example, edit it there and keep the rule files linking to it. - Keep `references/index.md` in sync when adding, moving or renaming a reference file.
Files in this package (16)
- SKILL.md 3 KB
- references/index.md 2 KB
- references/concurrency/async.md 4 KB
- references/concurrency/performance.md 3 KB
- references/core/conventions-examples.md 9 KB
- references/core/conventions.md 7 KB
- references/core/docstrings.md 2 KB
- references/core/style-toolchain.md 5 KB
- references/core/typing.md 5 KB
- references/core/version.md 3 KB
- references/frameworks/frameworks.md 7 KB
- references/safety/error-handling.md 2 KB
- references/safety/security.md 3 KB
- references/safety/testing.md 5 KB
- references/tooling/docker-management.md 3 KB
- references/tooling/package-management.md 5 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · sydasif/claude-python-standards | 100 | MIT |
| sophophilix/agent-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 06ca2809d1bc (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90python-craft
Python backend engineering standards — FastAPI (primary), Django, Flask; async correctness, Pydantic v2, SQLAlchemy 2.0, DI, config, and modern tooling (ruff/mypy/uv). Loaded on top of backend-craft when the ticket's stack is Python. Use when building Python APIs. - 100python
Guides Python development with modern idioms, tooling, and project structure. ALWAYS trigger on "python project", "pyproject.toml", "ruff", "mypy", "pytest", "poetry", "python setup", "type hints", "pydantic", "dataclass", "async python", "asyncio", "python anti-pattern",… - 100sota-python
State-of-the-art Python engineering for both writing new Python and auditing existing Python code. Covers uv-based tooling and project setup, strict typing, idioms and pitfalls, asyncio structured concurrency, security (injection, deserialization, supply chain), performance, and… - 90python-fastapi
Build and review modern Python services with FastAPI, Pydantic v2, async SQLAlchemy, typing, uv/ruff/pytest. Use when writing Python APIs, workers or data-facing backends. - 90dev-python-quality
Use when Python-specific typing, async behavior, packaging, pytest, ruff/mypy, scripting, or performance quality is central to the request. Do not trigger for generic small code edits merely written in Python. - 95python-quality
Python code quality with Ruff, Black, mypy, and Pylint. Covers linting, formatting, type checking, and best practices. USE WHEN: user works with "Python", "Django", "FastAPI", "Flask", asks about "Ruff", "Black", "mypy", "Pylint", "Python linting", "Python type hints" DO NOT USE…