python-expert

python-expert is an agent for coding agents from davepoon/buildwithclaude. It costs 52 tokens per session (421 once invoked), scanned A, original, MIT.

A coding assistant for Python, a general-purpose language used in web services, automation, data work, and scripting. It covers idiomatic code, async programming, type hints, testing, and performance profiling.

In plain words
What is it for?
Use it to refactor Python, design decorators and generators, build asynchronous code, add type hints, improve memory use, handle exceptions, and write pytest tests.
Why use it?
It helps turn complex Python code into clearer, more maintainable code while avoiding inefficient patterns and poorly handled resources or errors.

Agent

Part of the agents-language-specialists plugin — 12 agents shipped together

About the project

davepoon/buildwithclaude is a discovery hub and plugin marketplace for Claude Code extensions, including agents, commands, hooks, skills, plugins, MCP servers, and marketplace collections. Developers use it to browse, search, and find installation instructions for tools that extend Claude-related workflows. Catalogue entries include agents, plugins, commands, and skills from this collection.

davepoon/buildwithclaude · 3,415 stars · on GitHub · buildwithclaude.com

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/davepoon/buildwithclaude/python-expert
Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Or install agents-language-specialists, the plugin that ships this one along with the rest of its 12 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/davepoon/buildwithclaude/python-expert.svg)](https://agentmods.dev/agents/davepoon/buildwithclaude/python-expert)
Your own site
<a href="https://agentmods.dev/agents/davepoon/buildwithclaude/python-expert"><img src="https://agentmods.dev/badge/agents/davepoon/buildwithclaude/python-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 421 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.1 $0.00052 $0.00421
Opus 5 $0.00026 $0.00211
Sonnet 5 $0.00010 $0.00084
Haiku 4.5 $0.00005 $0.00042

Measured 2d ago against content hash 5214bda077af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 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.

plugins/agents-language-specialists/agents/python-expert.md · 53 lines

What it actually says

You are a Python expert specializing in clean, performant, and idiomatic Python code.

When invoked:

  1. Analyze existing code structure and patterns
  2. Identify Python version and dependencies
  3. Review performance requirements
  4. Begin implementation with best practices

Python mastery checklist:

  • Advanced features (decorators, generators, context managers)
  • Async/await and concurrent programming
  • Type hints and static typing (3.10+ features)
  • Metaclasses and descriptors when appropriate
  • Performance optimization techniques
  • Memory efficiency patterns
  • Design patterns in Python
  • Testing strategies with pytest

Process:

  • Write Pythonic code following PEP 8
  • Use type hints for all functions and classes
  • Prefer composition over inheritance
  • Implement generators for memory efficiency
  • Handle errors with custom exceptions
  • Use async/await for I/O operations
  • Profile before optimizing
  • Test with pytest, aim for 90%+ coverage

Code patterns:

  • List/dict/set comprehensions over loops
  • Context managers for resource handling
  • Functools for functional programming
  • Dataclasses/Pydantic for data structures
  • Abstract base classes for interfaces
  • Property decorators for encapsulation
  • Walrus operator for concise code (3.8+)

Provide:

  • Clean Python code with complete type hints
  • Unit tests with pytest fixtures and mocks
  • Performance benchmarks for critical sections
  • Docstrings following Google/NumPy style
  • Refactoring plan for existing code
  • Memory/CPU profiling results if needed
  • Requirements.txt or pyproject.toml

Leverage Python's standard library first. Use third-party packages judiciously. Specify Python version (3.8/3.9/3.10/3.11/3.12).

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. 2d ago First seen · 53 lines · 52 tokens per session scan A 5214bda077af

Subscribe to this mod's changes

python-expert is an agent published in the GitHub repository davepoon/buildwithclaude (3,415 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 421 once invoked, about $0.0003 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-09-03.

Related

Other agents, from other repositories

python-expert

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Specializes in FastMCP 4.x async servers, real API integrations, plain text formatting for LLM consumption, and comprehensive async testing with pytest-asyncio. Use PROACTIVELY for Python refactoring, optimization, or…

utensils/mcp-nixos · 73 tokens

model-context-protocol-mcp-expert

Use this agent when you need assistance with Model Context Protocol (MCP) development, including building clients and servers, debugging MCP applications, understanding protocol specifications, or implementing MCP solutions using Python or TypeScript SDKs. This includes tasks like creating new MCP servers, integrating…

xbim08/awesome-claude-code-plugins · 0 tokens

python-expert

Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?"…

xbim08/awesome-claude-code-plugins · 214 tokens

fastapi-pro

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

NOMARJ/sigil · 57 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

NOMARJ/sigil · 51 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use proactively for Python refactoring, optimization, or complex Python features.

NickCrew/Claude-Cortex · 50 tokens