agent-python-expert
БесплатноБез исполняемых скриптовНе проверенSpecialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework…
от travisjneuman★ 115 звёзд на GitHubОб этом скилле
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 | None
Async 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 v
Context 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.md
Tools
- ruff: Fast linter (replaces flake8, isort)
- mypy: Static type checking
- pytest: Testing framework
- uv/pip: Package management
Your task
$ARGUMENTS
Установить agent-python-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл agent-python-expert?
Specialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.
Как установить скилл agent-python-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-python-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic