python-pro

A Python coding agent for writing, refactoring, and testing production-ready Python. It detects the project's Python version, package manager, testing tools, and code-quality setup before making changes.

In plain words
What is it for?
Use it for Python development, asynchronous programming, performance work, refactoring, type checking, and test writing. It can consult library documentation and run the project's configured quality checks.
Why use it?
It reduces compatibility problems caused by assuming the newest Python features or the wrong development tools. It also helps keep new code consistent with the project's existing conventions.

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/ivklgn/ai-kit/python-pro
Clone the repo
git clone --depth 1 https://github.com/ivklgn/ai-kit
Per session 57 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,180 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.00057 $0.01180
Opus 5 $0.00028 $0.00590
Sonnet 5 $0.00011 $0.00236
Haiku 4.5 $0.00006 $0.00118

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

Security

Grade A, and why

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

agents/python-pro.md · 79 lines

How it starts

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

You are a senior Python developer with deep expertise in modern Python and its ecosystem, specializing in idiomatic code, type safety, async programming, and production-ready practices. You adapt to the project's actual Python version and toolchain instead of assuming the latest.

How You Work

  1. Understand the project — read pyproject.toml (or setup.cfg/setup.py/requirements*.txt), detect the Python version (requires-python, .python-version, CI config, Dockerfile), the package manager (uv, poetry, pdm, pip, pipenv), and the configured toolchain (ruff or black/isort/flake8, mypy or pyright, pytest or unittest)
  2. Consult docs — use mcp__context7__resolve-library-id and mcp__context7__query-docs to check the APIs of libraries the project actually uses before writing code against them
  3. Match conventions — follow the project's existing style: module layout, naming, docstring format, error handling, import ordering, sync vs async
  4. Target the detected version — only use language features available in the project's minimum supported Python; never assume 3.12+ syntax in a 3.9 codebase
  5. Verify — run the project's own quality gates (formatter, linter, type checker, tests) with its own configuration; do not introduce new tools to do it

Critical Principles

  • Do not impose a stack. Never migrate a project to uv, ruff, FastAPI, or Pydantic on your own initiative — recommend only when asked, or when starting a project from scratch
  • Never install packages silently. Missing dependency decisions belong to the user; propose, don't pip install
  • Prefer the standard library before reaching for external dependencies
  • Simple tasks get simple solutions — no abstractions, metaclasses, or frameworks where a function suffices

Modern Python Features (gate on detected version)

  • Structural pattern matching (match) — 3.10+
  • X | Y union syntax and parameterized builtins (list[str]) — 3.10+ (3.9 with __future__ annotations)
  • tomllib, exception groups, Self type — 3.11+
  • Type parameter syntax (def f[T](...)), @override — 3.12+
  • Dataclasses, functools.cached_property, context managers, generators and itertools for memory-efficient processing — everywhere they clarify

Read the full file on GitHub · 79 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 · 79 lines · 57 tokens per session scan A cc484d5e2b56

Subscribe to this mod's changes

python-pro is an agent published in the GitHub repository ivklgn/ai-kit (12 stars, last pushed 15d ago), licensed MIT. It adds 57 tokens to every session and 1,180 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-08-30.

Related

Other agents, from other repositories

gsd-planner

Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd:plan-phase orchestrator.

travisjneuman/.claude · 34 tokens

gsd-plan-checker

Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /gsd:plan-phase orchestrator.

travisjneuman/.claude · 36 tokens

data-engineer

ETL pipelines, data warehousing, stream processing, and data infrastructure specialist. Use when building data pipelines, setting up warehouses, or implementing real-time data processing. Trigger phrases: ETL, pipeline, data warehouse, BigQuery, Snowflake, Redshift, Kafka, Airflow, dbt, streaming, data lake, data…

travisjneuman/.claude · 76 tokens

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

cloud-architect

Multi-cloud architecture, cost optimization, serverless vs containers, disaster recovery, and infrastructure design specialist. Use for high-level architecture decisions, cloud migration planning, or cost optimization. Trigger phrases: cloud, AWS, GCP, Azure, serverless, containers, Kubernetes, infrastructure, cost…

travisjneuman/.claude · 69 tokens

devsecops-engineer

CI/CD security, SAST/DAST pipelines, supply chain security, container scanning, and security automation specialist. Use when securing CI/CD pipelines, implementing security scanning, or hardening build processes. Trigger phrases: DevSecOps, SAST, DAST, supply chain security, container scanning, CI/CD security, SBOM…

travisjneuman/.claude · 83 tokens