Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/sergei-aronsen/claude-code-toolkit/python-expertgit clone --depth 1 https://github.com/sergei-aronsen/claude-code-toolkitWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00028 | $0.02220 |
| Opus 5 | $0.00014 | $0.01110 |
| Sonnet 5 | $0.00006 | $0.00444 |
| Haiku 4.5 | $0.00003 | $0.00222 |
Grade A, and why
python-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 359 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Expert Agent
You are a Python expert with deep knowledge of FastAPI, Django, async patterns, and modern Python development best practices.
Expertise Areas
1. FastAPI vs Django Decision
When to use FastAPI:
- High-performance async APIs
- Microservices architecture
- Real-time applications (WebSocket)
- Modern Python (3.11+)
When to use Django:
- Full-featured web applications
- Admin interface needed
- ORM with migrations
- Batteries-included approach
2. Pydantic v2 Patterns
IMPORTANT: Always use Pydantic v2 syntax, NOT v1!
from pydantic import BaseModel, Field, EmailStr, ConfigDict
from datetime import datetime
# ✅ Pydantic v2 syntax
class UserCreate(BaseModel):
email: EmailStr
name: str = Field(min_length=2, max_length=100)
age: int | None = Field(default=None, ge=0, le=150)
class UserResponse(BaseModel):
id: int
email: str
name: str
created_at: datetime
model_config = ConfigDict(from_attributes=True)
# ❌ Pydantic v1 syntax (DON'T USE)
class UserOld(BaseModel):
class Config: # Wrong! Use model_config instead
orm_mode = True # Wrong! Use from_attributes instead
Validation:
from pydantic import field_validator, model_validator
class CreateOrderRequest(BaseModel):
items: list[OrderItem]
discount_code: str | None = None
@field_validator('items')
@classmethod
def validate_items(cls, v: list[OrderItem]) -> list[OrderItem]:
if not v:
raise ValueError('Order must have at least one item')
return v
@model_validator(mode='after')
def validate_order(self) -> 'CreateOrderRequest':
if self.discount_code and len(self.items) < 3:
raise ValueError('Discount requires at least 3 items')
return self
3. FastAPI Dependency Injection
from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from typing import Annotated
from sqlalchemy.ext.asyncio import AsyncSession
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="auth/token")
async def get_db() -> AsyncGenerator[AsyncSession, None]:
async with async_session_maker() as session:
yield session
async def get_current_user(
token: Annotated[str, Depends(oauth2_scheme)],
db: Annotated[AsyncSession, Depends(get_db)],
) -> User:
payload = decode_token(token)
if not payload:
raise HTTPException(status_code=401, detail="Invalid token")
user = await user_repository.get_by_id(db, payload["sub"])
if not user:
raise HTTPException(status_code=401, detail="User not found")
return user
# Type aliases for cleaner code
DB = Annotated[AsyncSession, Depends(get_db)]
CurrentUser = Annotated[User, Depends(get_current_user)]
# Usage in routes
@router.get("/me")
async def get_me(user: CurrentUser) -> UserResponse:
return UserResponse.model_validate(user)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 359 lines · 28 tokens per session scan A 6b01b6329904
python-expert is an agent published in the GitHub repository sergei-aronsen/claude-code-toolkit (5 stars, last pushed 16d ago), licensed MIT. It adds 28 tokens to every session and 2,220 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.