python-reviewer

python-reviewer is an agent for Claude Code from KevinZai/commander. It costs 39 tokens per session (1,065 once invoked), scanned A, original, MIT.

A code-review agent specialised in Python, including its style rules, type hints, asynchronous code, tests, and security concerns.

In plain words
What is it for?
Use it to review Python code for PEP 8 style, type annotations, async and await usage, pytest quality, and security vulnerabilities.
Why use it?
It catches Python-specific correctness and maintainability problems that a general review may overlook.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the commander plugin — 23 agents, 29 hooks, 1 plugin shipped together

Good fit Use it to review Python code for PEP 8 style, type annotations, async and await usage, pytest quality, and security vulnerabilities.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kevinzai/commander/python-reviewer
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/KevinZai/commander

Made for: Claude Code.

Or install commander, the plugin that ships this one along with the rest of its 23 agents, 29 hooks, 1 plugin.

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/kevinzai/commander/python-reviewer/github.svg)](https://agentmods.dev/agents/kevinzai/commander/python-reviewer)
Your own site
<a href="https://agentmods.dev/agents/kevinzai/commander/python-reviewer"><img src="https://agentmods.dev/badge/agents/kevinzai/commander/python-reviewer/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-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/kevinzai/commander/python-reviewer"><img src="https://agentmods.dev/badge/agents/kevinzai/commander/python-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 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,065 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00039 $0.01065
Opus 5.5 $0.00016 $0.00426
Sonnet 5.5 $0.00008 $0.00213
Haiku 4.5 $0.00004 $0.00106

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

Security

Grade A, and why

python-reviewer scanned grade A with 1 finding 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

3. Surface hotspots: `Grep` for `shell=True`, `os.system`, `pickle.load`, `yaml.load(`, `eval(`, `exec(`, `except:`, `def .*=\[\]`. Triage each hit in context; most are fine.
commander/cowork-plugin/agents/python-reviewer.md · 93 lines

How it starts

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

Python reviewer agent

Own the Python-specific review of one change set; the general reviewer agent covers language-neutral concerns. Your job is to refute the claim that the Python code is correct, idiomatic and safe. Treat the author's summary and reported results as claims, not evidence. Return severity-rated findings anchored to path:line, each with a concrete fix, and a verdict. When you cannot establish correctness, the verdict is refuted.

Protocol

  1. Scope the change: git diff --stat <base>...HEAD and git diff <base>...HEAD -- <Python paths>. Read each changed file around every hunk.
  2. Read the project configuration that sets the review baseline: pyproject.toml / setup.cfg (Python version, ruff/mypy/pyright config), pytest.ini.
  3. Surface hotspots: Grep for shell=True, os.system, pickle.load, yaml.load(, eval(, exec(, except:, def .*=\[\]. Triage each hit in context; most are fine.
  4. Walk every hunk against the checklist below. For each candidate finding, try to disprove it (an existing guard, a type, a test, an unreachable path) before keeping it.
  5. For security findings, trace the input from its entry point to the sink and state the path.
  6. Run the toolchain checks that exist, without installing anything: the configured linter and type checker (ruff check, mypy or pyright) and pytest <path> -q for the touched modules, when installed. Record each command and result.
  7. Grep for the same defect in sibling code and list occurrences.

Checklist

Types and style

  • Public functions without parameter and return annotations; unexplained Any.
  • Union syntax inconsistent with the supported Python version (X | None needs 3.10+).
  • Naming and import order against the project's configured linter, not personal taste.

Idioms and correctness

  • Mutable default arguments; late-binding closures over loop variables.
  • Class attributes used as per-instance state; resources opened without with.
  • Bare except: or except Exception: pass that hides failures.

Read the full file on GitHub · 93 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 Changed · -164 lines · +2 tokens per session scan B → A f50d7c2c3f25
  2. 3mo ago First seen · 257 lines · 37 tokens per session scan B b1620733869e

Subscribe to this mod's changes

python-reviewer is an agent published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 1,065 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

python-reviewer compared with agents from other repositories

python-reviewer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-reviewerKevinZai/commanderAgent6todayMITA39Claude Code
code-reviewerskullninja/coco-workflowAgent71mo agoMITA127Claude Code
security-auditorandisab/swe-marketplaceAgent232d agoMITA341Claude Code
content-linksgreglas75/zuvoAgent82d agoMITA24Claude Code
blind-coverage-auditor-altgreglas75/zuvoAgent82d agoMITA31Claude Code
refactor-advisorfullymiddleaged/ClawnessAgent520d agoMITA42Claude Code
task-executorskullninja/coco-workflowAgent71mo agoMITA97Claude Code