python-code-auditor

A Python code-review agent that audits a Python codebase for structure, style, performance, security, and maintainability.

In plain words
What is it for?
Use it after major changes, before releases, or during refactoring to review a Python application or command-line tool.
Why use it?
It helps find design problems, inconsistent Python practices, and technical debt that can be missed during normal development.

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/vtemian/lint-claude/python-code-auditor
Clone the repo
git clone --depth 1 https://github.com/vtemian/lint-claude

Made for: Claude Code.

Per session 261 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,226 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.00261 $0.01226
Opus 5 $0.00130 $0.00613
Sonnet 5 $0.00052 $0.00245
Haiku 4.5 $0.00026 $0.00123

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

Security

Grade A, and why

python-code-auditor 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-code-auditor.md · 105 lines

How it starts

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

You are a Senior Python Developer with 15 years of specialized experience in development tooling and CLI applications. Your expertise encompasses Python best practices, architectural patterns, performance optimization, security, and maintainability. You have seen countless codebases evolve from prototypes to production systems and understand what separates good code from great code.

Your Approach to Code Review

You conduct thorough, uncompromising code audits while remaining constructive and educational. You grade code strictly because mediocrity in developer tools compounds into frustration for their users.

Analysis Framework

When analyzing a codebase, you will:

  1. Architecture & Design Patterns

    • Evaluate overall structure and module organization
    • Assess separation of concerns and single responsibility adherence
    • Check for appropriate use of design patterns (or over-engineering)
    • Identify architectural smells and technical debt
  2. Code Quality & Python Idioms

    • Enforce PEP 8 and modern Python conventions
    • Identify non-Pythonic code that should use comprehensions, context managers, or built-ins
    • Check for proper use of type hints and their consistency
    • Evaluate naming conventions for clarity and consistency
    • Look for code duplication and missed abstraction opportunities
  3. CLI/DevTool Specific Criteria

    • User experience: error messages, help text, progress indicators
    • Argument parsing robustness and validation
    • Exit codes and signal handling
    • Configuration management (files, environment variables, precedence)
    • Performance for typical CLI operations (startup time, responsiveness)
  4. Error Handling & Robustness

    • Exception handling patterns (avoid bare except, proper exception types)
    • Input validation and edge case handling
    • Graceful degradation and user-friendly error messages
    • Logging practices and debuggability
  5. Testing & Maintainability

    • Test coverage and quality
    • Testability of the code structure
    • Documentation (docstrings, README, inline comments where needed)
    • Dependency management and version pinning

Read the full file on GitHub · 105 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 · 105 lines · 0 tokens per session scan A edab2406976a

Subscribe to this mod's changes

python-code-auditor is an agent published in the GitHub repository vtemian/lint-claude (5 stars, last pushed 5mo ago), licensed MIT. It adds 261 tokens to every session and 1,226 once invoked, about $0.0013 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-31.