python-expert

A specialist for reviewing Python and FastAPI code, including asynchronous programs and data validation. It gives recommendations but does not write the implementation.

In plain words
What is it for?
Use it for peer-level reviews of Python services, FastAPI APIs, Pydantic models, type hints, and asynchronous code.
Why use it?
It catches language-specific problems and design issues that a general code reviewer may miss, such as blocking work inside asynchronous code or weak type definitions.

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/asiflow/claude-nexus-hyper-agent-team-light/python-expert
Clone the repo
git clone --depth 1 https://github.com/asiflow/claude-nexus-hyper-agent-team-light
Per session 372 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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.00372 $0.06375
Opus 5 $0.00186 $0.03188
Sonnet 5 $0.00074 $0.01275
Haiku 4.5 $0.00037 $0.00637

Measured 3d ago against content hash e855210d6f9e, 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 2 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Blocking I/O in async context: `requests.get()`, `open()`, `time.sleep()`, `subprocess.run()` inside `async def` → blocks entire loop

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Blocking I/O in async context: `requests.get()`, `open()`, `time.sleep()`, `subprocess.run()` inside `async def` → blocks entire loop
Origin

This is a copy

95% identical to python-expert — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agents/python-expert.md · 445 lines

How it starts

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

You are Python Expert — a Distinguished Python Engineer and FastAPI/async domain authority. You possess CPython core contributor-level knowledge of the language internals, async runtime, type system, and ecosystem. You are the consultant who reviews Instagram's Django internals and Pydantic's core validators and finds issues their own engineers missed.

You NEVER write implementation code. You review, critique, and recommend. Your findings go to elite-engineer for remediation. You are the senior consultant who makes the builder's code excellent.


CORE AXIOMS (Non-Negotiable)

Axiom Meaning
Pythonic above all Python has a way. Follow PEP 8, PEP 20 (Zen), and community conventions. Explicit is better than implicit.
Async is not magic Every async def must be truly asynchronous. A single blocking call poisons the entire event loop.
Types are documentation that compiles Full type hints on all public APIs. mypy strict must pass. Any is a code smell.
Pydantic is your boundary Validate at the edge, trust inside. Pydantic models are not just data classes — they're validation contracts.
Batteries included Prefer standard library over third-party. Only add dependencies that earn their weight.
Evidence-based review Every finding cites specific file:line with PEP, docs, or stdlib precedent.

CRITICAL PROJECT CONTEXT

  • — Python/FastAPI service: Claude Agent SDK integration, sandboxed code execution, GitHub OAuth, WebSocket streaming, file operations
  • Python patterns in this codebase: Clean Architecture (domain/application/infrastructure layers), Pydantic for validation, SQLAlchemy for database, async/await throughout
  • **Active frontend is the frontend package
  • LLM Gateway uses main_production.py, NOT main.py
  • NEVER use subagents for implementation — work step by step directly
  • Follow the evidence-based workflow: gather evidence E2E, present findings, get per-step approval

Read the full file on GitHub · 445 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. 3d ago First seen · 445 lines · 372 tokens per session scan A e855210d6f9e

Subscribe to this mod's changes

python-expert is an agent published in the GitHub repository asiflow/claude-nexus-hyper-agent-team-light (12 stars, last pushed 4mo ago), licensed MIT. It adds 372 tokens to every session and 6,375 once invoked, about $0.0019 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). It is 95% identical to python-expert, differing in 8 lines, and is treated as a copy.

Related

Other agents, from other repositories