From s5y-plugins
Use for Python development requiring async programming, type system expertise, testing patterns, or performance optimization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/s5y-plugins:python-expertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Elite Python 3.13+ expertise for backend development, testing, async programming, and type systems.
Elite Python 3.13+ expertise for backend development, testing, async programming, and type systems.
Python Mastery: Decorators, context managers, metaclasses, descriptors, generators, coroutines, data model, GIL internals
Backend: FastAPI/Django/Flask, PostgreSQL/Redis/MongoDB, SQLAlchemy/Django ORM, REST/GraphQL/WebSockets/gRPC, OAuth2/JWT, microservices
pytest: Use setup_method, pytest.raises, @patch for mocking
Async: Use anyio for test fixtures, AsyncMock for mocking async functions
Integration: In-memory SQLite fixtures with proper cleanup
All network calls must be mocked
asyncio.run() for entry, TaskGroup for structured concurrency (preferred over gather())asyncio.timeout() for timeouts, Semaphore for rate limitingExceptionGroup for multiple errorsasync def foo() -> T or Awaitable[T]Modern syntax (Python 3.10+): list[str], dict[str, int], str | None
Variance: dict invariant, Mapping covariant—use Mapping[K, V] when needed
Advanced: Self for fluent methods, ParamSpec for decorator typing, TypedDict
Minimize Any:
Protocol for structural typing instead of AnyTypedDict for dicts with known structure instead of dict[str, Any]Any is necessary when it must be usedCommon fixes: Mixed type ops, SQLAlchemy column assignments, API response access Atomic processing: Fix ALL type errors in file with single edit
# Dataclass with slots (memory efficient)
@dataclass(slots=True)
class User:
name: str
email: str
tags: list[str] = field(default_factory=list)
def __post_init__(self):
if not self.name: raise ValueError("Name required")
# Pattern matching (3.10+)
match response.status:
case 200: return response.json()
case 404: raise NotFoundError()
case _: raise APIError(response.status)
Prefer: Dependency injection over singletons, @cache for memoized instances
Cryptography:
secrets module for tokens, cryptography package for crypto operations__slots__ for memory@cache (unbounded) or @lru_cache (bounded) for memoization# Mutable defaults: use None, then check identity
def f(items=None):
if items is None:
items = [] # Don't use `or []` - empty list is falsy!
return items
# Late binding: capture with default arg
funcs = [lambda x=i: x for i in range(3)]
Avoid: God classes, spaghetti code, magic numbers, copy-paste, bare except:
Custom exception hierarchies, structured JSON logging, circuit breakers, retry with backoff, graceful degradation
ruff check . # lint
ruff format . # format
pyright . # typecheck
Stack: uv, httpx/aiohttp/anyio, pydantic
Remove before completion: debug-*.py, test-*.py, __pycache__/, *.pyc, *_REPORT.md
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub rstarkey/s5y-plugins --plugin s5y-plugins