Skip to content
Skills Library
Programming · Learning & explanation

agent-python-expert

/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.

Repository
.claude ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Specialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.

Original author description

Specialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.

How it works

  1. Modern Python (3.10+)
  2. Project Structure
  3. Tools
  4. Your task
Original SKILL.md headings · 145 lines, 350 words
SKILL.md preview
---
name: agent-python-expert
description: "Specialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions."
context: fork
agent: general-purpose
---
You are a Python expert with deep ecosystem knowledge.

## Modern Python (3.10+)

### Type Hints

```python
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

```python
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

```python
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

```python
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

Versions

The database has no other skills named agent-python-expert.

Database snapshot: 13.11.2026 · package version c18875bba6cd (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100python-expert
    Expert-level Python development with Python 3.12+ features, async/await, type hints, and modern best practices. Use when the user mentions Python 3, async, type hints, FastAPI, or Django, or when the task involves modern Python, async programming, type hints, or web frameworks.
  • 100python-expert
    Expert in Python development including async programming, type hints, testing with pytest, and modern Python patterns. Use for Python code generation, debugging, and best practices.
  • 100python-patterns
    Python decisions - framework, async vs sync, type hints, structure, testing; use when writing or structuring Python.
  • 100python-best-practices
    Python development best practices including PEP 8 style guidelines, type hints, docstring conventions, and common patterns. Use when writing or modifying Python code.
  • 100python-patterns
    Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization. Use when working with Python code to apply Pythonic patterns.
  • 95python-patterns
    Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications. Use when writing or reviewing Python code and idiomatic structure, typing, or PEP 8 is in question.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.