python-rules
Installation
SKILL.md
Python Rules
These rules come from app/rules/python/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in Python. Apply them when writing or
reviewing Python code.
Python Coding Style
Type Hints
- Type all public function signatures (parameters + return).
- Use
str | None(PEP 604) overOptional[str]on Python 3.10+. - Use
from __future__ import annotationsfor forward references. - Use
TypeAliasortype(3.12+) for complex type aliases. - Use
Protocolfor structural subtyping instead of ABCs where possible.