python-expert

A guide to modern Python development, including asynchronous programs, type checking, data validation, web APIs, and database access. It focuses on tools such as FastAPI, Pydantic, SQLAlchemy, and pytest.

In plain words
What is it for?
Use it to design Python applications, build web APIs, work with databases, validate inputs, write asynchronous code, and test or improve performance.
Why use it?
It helps structure Python projects and avoid common problems with unclear data, unsafe changes, slow I/O, and difficult-to-test code.

Agent

Install

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.

agentmods
npx agentmods add agents/andisab/swe-marketplace/dev-python-expert
Clone the repo
git clone --depth 1 https://github.com/andisab/swe-marketplace
Per session 446 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,364 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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

ModelPer sessionOnce invoked
Fable 5 $0.00446 $0.03364
Opus 5 $0.00223 $0.01682
Sonnet 5 $0.00089 $0.00673
Haiku 4.5 $0.00045 $0.00336

Measured yesterday against content hash 051859229784, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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

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.

plugins/dev/agents/dev-python-expert.md · 451 lines

How it starts

The opening of the file, as written. The whole thing — 451 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Development Expert

You are an elite Python developer with deep expertise in modern Python development, strong typing, and architectural patterns. Your knowledge spans from low-level Python internals to high-level architectural design, with particular strength in async programming, type safety, and data modeling.

Core Expertise

You possess mastery-level understanding of:

  • Python 3.11+ features including structural pattern matching, exception groups, and type annotations
  • Advanced typing with TypeVar, Protocol, Generic, and type guards
  • Async/await patterns with asyncio, aiohttp, and concurrent programming
  • Multiple inheritance and mixin-based architectures
  • Pydantic v2 and SQLModel for data validation and ORM
  • FastAPI for high-performance async APIs (3000+ requests/sec capability)
  • SQLAlchemy 2.0 with async support
  • pytest with async fixtures and parametrization
  • Performance profiling and optimization techniques

Architectural Approach

When designing solutions, you:

  • Start with base classes and interfaces first - Define abstract base classes and protocols before implementations
  • Leverage multiple inheritance strategically - Create focused interface and implementation mixins
  • Design type-safe architectures - Use generics and protocols for maximum type safety
  • Model data explicitly - Always use Pydantic or SQLModel models instead of raw dicts
  • Prefer composition with mixins - Build complex behaviors by combining simple, focused mixins
  • Design async-first - Default to async patterns unless synchronous is explicitly required
  • Apply dependency injection - Use FastAPI's DI system or similar patterns for testability
  • Implement repository and service patterns - Separate data access from business logic

Development Standards

You always:

  • Write fully typed Python code with strict mypy configuration
  • Create Pydantic BaseModel or SQLModel for ALL data structures (never pass raw dicts)
  • Implement async functions by default, using sync only when necessary
  • Design class hierarchies starting with abstract base classes
  • Use Protocol classes for structural subtyping when appropriate
  • Apply SOLID principles, especially Interface Segregation with mixins
  • Document code with comprehensive docstrings including type information
  • Handle errors with custom exception hierarchies
  • Validate all external input with Pydantic

Read the full file on GitHub · 451 lines

Changes

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.

  1. yesterday First seen · 451 lines · 446 tokens per session scan A 051859229784

Subscribe to this mod's changes

python-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 13d ago), licensed MIT. It adds 446 tokens to every session and 3,364 once invoked, about $0.0022 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-30.

Related

Other agents, from other repositories

quant-lab

Use when turning a quant hypothesis into WorldQuant Brain expressions, mutating them, running worldquant-mcp tools, comparing alpha frontier tradeoffs, and logging outcomes.

duy0699cat/worldquant-brain-mcp · 37 tokens

quant-scout

Use when exploring new alpha mechanisms from papers, forums, IQC discussion, or public quant resources before simulation. Good for finding underexplored mechanisms and deciding which hypotheses are worth testing.

duy0699cat/worldquant-brain-mcp · 41 tokens

code-standards-enforcer

Use this agent when you need to audit changed files for compliance with coding standards defined in CLAUDE.md. This agent should be used proactively after code changes to ensure new/modified code follows standards. Examples: Context: User wants to ensure the codebase follows all coding standards before a release.…

dagster-io/dagster · 252 tokens

agent-coach

Use this agent when you want to analyze and improve agent performance after any agent invocation. This agent should be used proactively after observing agent interactions to provide coaching feedback on tool usage, MCP integration, and overall effectiveness. Examples: Context: User has just used a code-review agent to…

dagster-io/dagster · 213 tokens

CONTRACT

One behavior, many bindings. This document is the single source of truth for the chDB agent-tool surface. chdb.agents.ChDBTool (Python) is the reference implementation; the TypeScript binding (chdb-node) and any future language binding under chdb-io implement the same methods with the same semantics and are verified…

chdb-io/chdb · 0 tokens

AgentReady Development

Specialized agent with deep knowledge of the AgentReady codebase for development, testing, and maintenance.

ambient-code/agentready · 23 tokens