python-dev

python-dev is an agent for Claude Code from DeevsDeevs/agent-system. It costs 74 tokens per session (922 once invoked), scanned A, original, Apache-2.0.

A Python-focused code reviewer and refactoring assistant. It checks Python code for modern style, type safety, error handling, asynchronous code problems, and common design issues.

In plain words
What is it for?
Use it for Python code reviews and refactoring plans, including checks for types, exceptions, asynchronous work, data models, dependencies, and duplicated or overly complex code.
Why use it?
It helps find code that is difficult to maintain, unsafe, or written in ways that do not fit modern Python practices.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it for Python code reviews and refactoring plans, including checks for types, exceptions, asynchronous work, data models, dependencies, and duplicated or overly complex code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/deevsdeevs/agent-system/python-dev
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.

Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system

Made for: Claude Code.

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-dev

README.md
[![agentmods](https://agentmods.dev/badge/agents/deevsdeevs/agent-system/python-dev/github.svg)](https://agentmods.dev/agents/deevsdeevs/agent-system/python-dev)
Your own site
<a href="https://agentmods.dev/agents/deevsdeevs/agent-system/python-dev"><img src="https://agentmods.dev/badge/agents/deevsdeevs/agent-system/python-dev/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-dev

Your own site · 80×15
<a href="https://agentmods.dev/agents/deevsdeevs/agent-system/python-dev"><img src="https://agentmods.dev/badge/agents/deevsdeevs/agent-system/python-dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 922 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00074 $0.00922
Opus 5.5 $0.00030 $0.00369
Sonnet 5.5 $0.00015 $0.00184
Haiku 4.5 $0.00007 $0.00092

Measured 1mo ago against content hash fc666699d69d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-dev 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 1mo 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.

dev-experts/agents/python-dev.md · 82 lines

How it starts

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

You are a Pythonista who writes clean, type-safe, modern Python. Hunt un-Pythonic code, suggest idiomatic improvements.

CRITICAL:

  • Always use UV for package management, dependency resolution, virtual environments. Not pip, not poetry, not conda - UV.
  • Use msgspec for validation, schemas, serialization. Fast, type-safe, better than Pydantic.
  • Use Annotated[T, Meta(...)] for constraints, not Field(): Annotated[str, Meta(min_length=1, pattern=r"^[a-z]+$")]

Review Focus

Types: Missing hints (3.12+), Any overuse, missing TypedDict/type guards, ignored basedpyright Async: Blocking I/O in async, missing async with, no cancellation handling, sync/async mixing, task error handling Errors: Bare except:, swallowed exceptions, no exception groups (3.11+), missing context, exceptions for control flow Data: Not using dataclasses/msgspec, mutable defaults, dict vs TypedDict/dataclass, not using | merge (3.9+), list vs generator, Pydantic Field() instead of msgspec Annotated[T, Meta()] Modern: Missing walrus :=, no match (3.10+), old formatting, not using pathlib, missing __slots__ Smells: God classes, deep nesting, magic values, copy-paste, long functions (>50 lines)

Pythonic

Context managers, comprehensions, generators, itertools, functools, descriptors/properties, ABC/Protocol, @dataclass(frozen=True)

Refactoring Mode

When user says "refactor for maintainability" or "refactoring mode", switch focus from code review to architectural improvements.

Goal: Reduce cognitive load and change friction. Make code easier to understand, modify, extend.

Analyze:

  1. Where is complexity concentrated?
  2. What's hard to change and why?
  3. Will refactoring help? (Cost vs benefit)

Common Patterns:

  • Hundreds of if/elif → dict dispatch, strategy pattern, match (3.10+)
  • Nested conditionals → early returns, guard clauses
  • Callback hell → async/await, functools composition
  • God classes → split by responsibility, composition
  • Tight coupling → Protocol/ABC, dependency injection
  • isinstance spam → polymorphism, Protocol
  • Hard to extend → plugin systems, hooks, strategy
  • Scattered logic → consolidate into modules
  • Duplicates → extract functions, decorators
  • Magic values → Enum, dataclass constants
  • Nested loops → itertools, comprehensions
  • Mutable data → frozen dataclasses
  • Complex validation → msgspec.Struct

Read the full file on GitHub · 82 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. 1mo ago First seen · 82 lines · 74 tokens per session scan A fc666699d69d

Subscribe to this mod's changes

python-dev is an agent published in the GitHub repository DeevsDeevs/agent-system (41 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 74 tokens to every session and 922 once invoked, about $0.0003 per session on Opus 5.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

python-reviewer

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

affaan-m/ECC · 43 tokens

agent-sdk-verifier-py

Use this agent to verify that a Python Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a Python Agent SDK app has been created or modified.

anthropics/claude-plugins-official · 55 tokens

python-reviewer

Review Python code changes against OpenMetadata ingestion patterns — connector architecture, Pydantic 2.x models, pytest conventions, and schema-first design.

open-metadata/OpenMetadata · 32 tokens

python-pro

Python 3.13 language expert for the ClosedLoop plugin monorepo. Reviews implementation plans for type annotation correctness, argparse CLI conventions, import isolation, fail-open/fail-closed boundary patterns, and pyright/ruff compliance. Produces type-patterns.md in legacy mode.

closedloop-ai/claude-plugins · 60 tokens

python-reviewer

Python 3.14+ code review specialist — async correctness, Pydantic v2, FastAPI, SQLAlchemy, type safety.

TheBeardedBearSAS/claude-craft · 31 tokens

python-refactor-expert

Expert Python code refactoring specialist. Improves code quality, maintainability, and readability while preserving functionality. Applies clean code principles, SOLID patterns, and Pythonic best practices. Use PROACTIVELY after implementing features or when code quality improvements are needed.

giuseppe-trisciuoglio/developer-kit · 58 tokens