From python-experts
Enforces PEP 8 standards, modern type hints, Google-style docstrings, naming conventions, function length guidelines, and merge-friendly patterns. Auto-activates when writing or reviewing Python code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/python-experts:python-styleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill automatically activates when writing Python code to ensure consistency with PEP standards, type hints, and modern Python idioms.
This skill automatically activates when writing Python code to ensure consistency with PEP standards, type hints, and modern Python idioms.
list[str] not List[str], X | None not Optional[X])# Classes: PascalCase
class UserAccount:
pass
# Functions/variables: snake_case
def calculate_total():
user_name = "john"
# Constants: SCREAMING_SNAKE_CASE
MAX_RETRY_COUNT = 3
# Private: single underscore prefix
def _internal_helper():
pass
# Use built-in generics
def process(items: list[str]) -> dict[str, int]:
pass
# Use | for Optional/Union
def find_user(id: str) -> User | None:
pass
# TypedDict for structured dicts
class UserData(TypedDict):
id: str
name: str
except: clausesd, temp, x)process, handle, do_stuff)When multiple agents modify the same module, follow these patterns to enable automatic merge resolution by semantic merge tools (mergiraf).
uv run ruff format .
uv run ruff check --fix .
This ensures imports are consistently ordered, enabling clean merges.
__all__ Must Be AlphabeticalEnable RUF022 in ruff to enforce this automatically:
[tool.ruff.lint]
select = [
# ... other rules
"RUF022", # unsorted-dunder-all (enforces alphabetical __all__)
]
# CORRECT - alphabetical, one per line, no comments
__all__ = [
"ACLFilterSpec",
"Chunk",
"ChunkerInterface",
"Document",
"QueryACLContext",
"Visibility",
]
# WRONG - grouped by category (causes merge conflicts)
__all__ = [
# Types
"Chunk",
"Document",
# Interfaces
"ChunkerInterface",
]
Comments inside __all__, import groups, or other lists break deterministic ordering and cause merge conflicts. Keep comments outside:
# ACL and schema types exported for public API
__all__ = [
"ACLFilterSpec",
"Chunk",
"Document",
]
__init__.py, etc.)ruff format immediately after changesSemantic merge tools like mergiraf can automatically resolve conflicts when:
Without these patterns, parallel agents adding exports to the same __init__.py will create conflicts requiring manual resolution.
npx claudepluginhub jpoutrin/product-forge --plugin python-expertsConfigures ruff/mypy for Python linting/formatting, enforces PEP 8 naming/docstrings/type hints. Use for new projects, code reviews, or style standards.
Enforces Python standards with PEP 8 via Black (100-char lines), type hints on functions/classes, and Google docstrings. Use for writing/formatting Python code.
Reviews Python code enforcing type hints, Pythonic patterns, naming clarity, imports, testing practices, and maintainability. Strict on existing code modifications.