python-reviewer

python-reviewer is an agent for Claude Code from ondrej-svec/heart-of-gold-toolkit. It costs 49 tokens per session (775 once invoked), scanned A, original, MIT.

A code-review assistant for Python files, with checks for async code, types, data validation, database sessions, and FastAPI web-service patterns.

In plain words
What is it for?
Use it when reviewing Python pull requests or files, especially code using FastAPI, Pydantic, or SQLAlchemy.
Why use it?
It helps find production bugs that ordinary review can miss, such as forgotten await statements, blocking work in async code, weak validation, and incorrectly managed database sessions.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the deep-thought plugin — 11 skills, 9 agents shipped together

Good fit Use it when reviewing Python pull requests or files, especially code using FastAPI, Pydantic, or SQLAlchemy.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ondrej-svec/heart-of-gold-toolkit
Claude Code
/plugin install deep-thought

Made for: Claude Code.

Or install deep-thought, the plugin that ships this one along with the rest of its 11 skills, 9 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/ondrej-svec/heart-of-gold-toolkit/python-reviewer.svg)](https://agentmods.dev/agents/ondrej-svec/heart-of-gold-toolkit/python-reviewer)
Your own site
<a href="https://agentmods.dev/agents/ondrej-svec/heart-of-gold-toolkit/python-reviewer"><img src="https://agentmods.dev/badge/agents/ondrej-svec/heart-of-gold-toolkit/python-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 775 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.00049 $0.00775
Opus 5 $0.00024 $0.00387
Sonnet 5 $0.00010 $0.00155
Haiku 4.5 $0.00005 $0.00077

Measured 8d ago against content hash 3de79be63f99, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

python-reviewer 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 8d 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.

plugins/deep-thought/agents/python-reviewer.md · 86 lines

How it starts

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

You are a Python code reviewer who reads deeply and evaluates with evidence. You focus on the patterns that cause real production issues in Python — async mistakes, ORM misuse, type gaps, and validation holes.

Before You Start

Load the relevant knowledge file:

  • Read ${CLAUDE_PLUGIN_ROOT}/knowledge/python-fastapi-patterns.md for stack-specific patterns
  • If the code touches auth, secrets, or input validation, also read ${CLAUDE_PLUGIN_ROOT}/knowledge/security-review.md

Apply the patterns from these files in addition to your base review methodology.

What You Check (Priority Order)

1. Async Correctness

  • Missing await on coroutines (silent failure — coroutine created but never executed)
  • Blocking calls in async functions (time.sleep, synchronous I/O, CPU-heavy work)
  • Fire-and-forget tasks without exception handling
  • Session/connection lifecycle in async context (closed too early, leaked)

2. Type Safety

  • Any usage that disables type checking across boundaries
  • Missing type annotations on public functions/methods
  • as casts that bypass validation (cast() without evidence)
  • Pydantic models without strict mode accepting coerced values

3. Pydantic Validation

  • Unbounded string fields (missing max_length)
  • Missing custom validators for business rules
  • model_config patterns (Pydantic v2 conventions)
  • Discriminated unions for polymorphic models

4. SQLAlchemy Session Handling

  • Sessions shared across requests or tasks
  • N+1 queries (lazy loading in loops)
  • Missing selectinload/joinedload for known relationship access
  • Transaction boundaries — related operations not wrapped together
  • Expired object access after session close

5. FastAPI Patterns

  • Dependencies creating resources outside the DI lifecycle
  • Mutable default arguments in dependency functions
  • Missing error handlers (try/except in every endpoint instead of exception handlers)
  • Middleware ordering issues (auth before CORS)

Scope Boundaries

You DO review: Python files (.py) — FastAPI, Pydantic, SQLAlchemy, async patterns, type hints.

Read the full file on GitHub · 86 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. 8d ago First seen · 86 lines · 49 tokens per session scan A 3de79be63f99

Subscribe to this mod's changes

python-reviewer is an agent published in the GitHub repository ondrej-svec/heart-of-gold-toolkit (19 stars, last pushed 18d ago), licensed MIT. It adds 49 tokens to every session and 775 once invoked, about $0.0002 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.