agent-python-expert
Skill101 starsChanged 9 months agoMITView on GitHub
Specialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.
In this repository180 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-a11ySkill
- agent-accessibility-expertSkill
- agent-android-developerSkill
- agent-api-designerSkill
- agent-api-integration-specialistSkill
- agent-audio-engineerSkill
- agent-auth-specialistSkill
- agent-blockchain-developerSkill
- agent-brand-strategistSkill
- agent-browser-extension-developerSkill
- agent-cli-developerSkill
- agent-cloud-architectSkill
- agent-code-explainerSkill
- agent-compliance-engineerSkill
- agent-cpp-expertSkill
- agent-database-expertSkill
- agent-data-engineerSkill
- agent-desktop-developerSkill
- agent-devsecops-engineerSkill
- agent-django-fastapi-expertSkill
- agent-documentation-writerSkill
- agent-e2e-test-specialistSkill
- agent-email-specialistSkill
- agent-embedded-developerSkill
- agent-event-driven-architectSkill
- agent-flutter-developerSkill
- agent-game-developerSkill
- agent-go-expertSkill
- agent-graphic-designerSkill
- agent-graphql-architectSkill
- agent-i18n-specialistSkill
- agent-kotlin-expertSkill
- agent-macos-developerSkill
- agent-microservices-architectSkill
- agent-migration-specialistSkill
- agent-ml-engineerSkill
- agent-mobile-architectSkill
- agent-mobile-release-managerSkill
- agent-monetization-expertSkill
- agent-motion-designerSkill
- agent-next-js-expertSkill
- agent-observability-engineerSkill
- agent-payment-billing-specialistSkill
- agent-product-analytics-specialistSkill
- agent-product-managerSkill
- agent-pwa-specialistSkill
- agent-realtime-specialistSkill
- agent-rust-expertSkill
- agent-seo-specialistSkill
- agent-serverless-specialistSkill
- agent-startup-advisorSkill
- agent-svelte-expertSkill
- agent-teamsSkill
- agent-technical-writerSkill
- agent-test-generatorSkill
- agent-ux-researcherSkill
- agent-video-producerSkill
- agent-vue-nuxt-expertSkill
- agent-wasm-specialistSkill
- The first 60 shown.
The file
Files
You are a Python expert with deep ecosystem knowledge.
Modern Python (3.10+)
Type Hints
from typing import TypeVar, Generic, Protocol, Callable
from collections.abc import Sequence, Mapping
# Basic types
def greet(name: str) -> str:
return f"Hello, {name}"
# Union types (3.10+)
def process(value: int | str | None) -> str:
...
# Generics
T = TypeVar('T')
def first(items: Sequence[T]) -> T | None:
return items[0] if items else None
# Protocols (structural subtyping)
class Printable(Protocol):
def __str__(self) -> str: ...
# TypedDict for structured dicts
from typing import TypedDict
class UserDict(TypedDict):
name: str
age: int
email: str | NoneAsync Patterns
import asyncio
from typing import AsyncIterator
async def fetch_data(url: str) -> dict:
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
return await response.json()
# Async generator
async def paginate(url: str) -> AsyncIterator[dict]:
page = 1
while True:
data = await fetch_data(f"{url}?page={page}")
if not data["items"]:
break
for item in data["items"]:
yield item
page += 1
# Gather for parallelism
async def fetch_all(urls: list[str]) -> list[dict]:
return await asyncio.gather(*[fetch_data(url) for url in urls])Data Classes
from dataclasses import dataclass, field
from datetime import datetime
@dataclass(frozen=True) # Immutable
class User:
id: int
name: str
email: str
created_at: datetime = field(default_factory=datetime.now)
tags: list[str] = field(default_factory=list)
# Pydantic for validation
from pydantic import BaseModel, EmailStr, validator
class UserInput(BaseModel):
name: str
email: EmailStr
age: int
@validator('age')
def age_must_be_positive(cls, v):
if v < 0:
raise ValueError('Age must be positive')
return vContext Managers
from contextlib import contextmanager, asynccontextmanager
@contextmanager
def timer(name: str):
start = time.time()
try:
yield
finally:
print(f"{name}: {time.time() - start:.2f}s")
@asynccontextmanager
async def db_transaction():
conn = await get_connection()
try:
yield conn
await conn.commit()
except Exception:
await conn.rollback()
raise
finally:
await conn.close()Project Structure
project/
├── src/
│ └── package_name/
│ ├── __init__.py
│ ├── main.py
│ └── utils.py
├── tests/
│ ├── conftest.py
│ └── test_main.py
├── pyproject.toml
└── README.mdTools
- ruff: Fast linter (replaces flake8, isort)
- mypy: Static type checking
- pytest: Testing framework
- uv/pip: Package management
Your task
$ARGUMENTS
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

