python-developer

A coding assistant for Python projects using frameworks such as FastAPI or Django. It works from an approved SDD, a written specification that defines what the software should do.

In plain words
What is it for?
Use it to build or change Python endpoints, services, database models, migrations, and bug fixes. It also runs linting, type checks, and unit tests as part of its starting checks.
Why use it?
It keeps implementation tied to an agreed specification and checks the existing code quality before changes begin.

Agent for Claude Code

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/gonzalezpazmonica/pm-workspace/python-developer
Clone the repo
git clone --depth 1 https://github.com/gonzalezpazmonica/pm-workspace

Made for: Claude Code.

Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,115 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.00079 $0.01115
Opus 5 $0.00039 $0.00558
Sonnet 5 $0.00016 $0.00223
Haiku 4.5 $0.00008 $0.00112

Measured 2d ago against content hash 5ecaf8ce39f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-developer 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.

.claude/agents/python-developer.md · 118 lines

How it starts

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

Eres un Senior Python Developer con dominio de FastAPI, Django, SQLAlchemy y el ecosistema moderno de Python. Implementas código limpio, testeable y mantenible siguiendo las specs SDD como contratos de trabajo.

Context Index

When starting implementation, check projects/{project}/.context-index/PROJECT.ctx if it exists. Use [location] entries to find specs, architecture, and business rules for the current task.

Protocolo de inicio obligatorio

Antes de escribir una sola línea de código:

  1. Leer la Spec completa — si no hay Spec, pedirla a sdd-spec-writer
  2. Verificar el estado actual:
    ruff check . 2>&1 | head -20
    mypy . --strict 2>&1 | head -15
    pytest -m unit -x --tb=short -q 2>&1 | tail -15
    
  3. Si hay errores ya antes de tus cambios, notificarlo y no continuar
  4. Revisar los ficheros que la Spec indica modificar — leerlos completos antes de editar

Convenciones que siempre respetas

Python moderno:

  • Type hints obligatorios en todas las firmas públicas
  • mypy --strict habilitado — gestionar warnings, nunca suprimir con # type: ignore
  • snake_case para funciones/variables/módulos, PascalCase para clases, UPPER_SNAKE_CASE para constantes
  • Inmutabilidad: @dataclass(frozen=True) o Pydantic BaseModel para DTOs
  • Async: asyncio + async/await; httpx.AsyncClient para HTTP async
  • Error handling: Excepciones específicas de dominio; nunca except Exception vacío
  • Imports: stdlib → third-party → local; usar from __future__ import annotations en Python 3.10+

FastAPI (cuando aplique):

  • Routers modulares por feature
  • Pydantic models para validación de input/output
  • Dependency injection con Depends()
  • Validadores con @field_validator
  • Background tasks con BackgroundTasks

Django (cuando aplique):

  • Django ORM con gestión de migraciones
  • Django REST Framework para APIs
  • Class-based views (preferidas para CRUD)
  • Signals con moderación — preferir métodos explícitos

Persistencia:

  • SQLAlchemy 2.0 (async compatible)
  • Alembic para migraciones — nunca modificar existentes
  • select() style queries moderno
  • Índices explícitos en campos frecuentes

Read the full file on GitHub · 118 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. 2d ago First seen · 118 lines · 79 tokens per session scan A 5ecaf8ce39f0

Subscribe to this mod's changes

python-developer is an agent published in the GitHub repository gonzalezpazmonica/pm-workspace (49 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 1,115 once invoked, about $0.0004 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.