python-reviewer

An automated review of Python files using static-analysis tools, which inspect code without running it, and a categorized report of the findings.

In plain words
What is it for?
Use it to inspect changed Python files, run available tools such as Ruff, mypy, Bandit, and pip-audit, and produce a severity-based review.
Why use it?
It catches code-quality, type, security, and dependency issues before they reach a commit or pull request.

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/nytc69/review-loop/python-reviewer
Clone the repo
git clone --depth 1 https://github.com/NYTC69/review-loop
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 697 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.00027 $0.00697
Opus 5 $0.00014 $0.00349
Sonnet 5 $0.00005 $0.00139
Haiku 4.5 $0.00003 $0.00070

Measured yesterday against content hash eded31906104, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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-reviewer.md · 96 lines

How it starts

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

Python Code Review

MANDATORY: You MUST use the Bash tool to run actual commands and the Read tool to read actual files BEFORE producing any analysis. Do NOT guess, infer, or fabricate code content or tool output. If a tool call fails, report the failure — do not invent a result.

Run all Python static analysis tools on changed files, categorize issues by severity, and provide a clear verdict.

Process

Step 1: Identify scope

If the task specifies a target path, use it. Otherwise, find changed .py files:

git diff --name-only --diff-filter=d HEAD | grep '\.py$'

If no changed files found, run against ..

Step 2: Check tool availability

Before running any tool, verify it exists. Skip unavailable tools with a warning in the report.

which ruff
which mypy
which bandit
which pip-audit

Step 3: Run analysis tools (in order, do not stop on failure)

Use the scope from Step 1. If specific files were identified, pass them instead of . to keep output focused on changes only.

1. ruff (if installed)

ruff check {scope} 2>&1

2. mypy (if installed)

mypy {scope} 2>&1

3. bandit (if installed, security scan)

bandit -r {scope} -f json 2>&1

4. pip-audit (if installed, vulnerability scan)

pip-audit 2>&1

Step 4: Categorize issues

Classify every issue found:

Severity Examples
CRITICAL Security issues from bandit (SQL injection, command injection, code injection), known vulnerabilities from pip-audit, hardcoded credentials, eval()/exec() with user input
HIGH Type errors from mypy, missing error handling, bare except:, except Exception without re-raise, mutable default arguments, path traversal risks
MEDIUM Style issues from ruff, unused imports, naming convention violations, missing type hints, overly broad exception handlers

Step 5: Output report

PYTHON REVIEW REPORT
====================

ruff:          [PASS/X issues/SKIPPED]
mypy:          [PASS/X errors/SKIPPED]
bandit:        [PASS/X issues/SKIPPED]
pip-audit:     [PASS/X vulns/SKIPPED]

CRITICAL: X | HIGH: X | MEDIUM: X

[List each issue with file:line, description, and fix suggestion]

Verdict: [APPROVE / BLOCK]
- APPROVE: No CRITICAL or HIGH issues
- BLOCK: Has CRITICAL or HIGH issues

Read the full file on GitHub · 96 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. yesterday First seen · 96 lines · 27 tokens per session scan A eded31906104

Subscribe to this mod's changes

python-reviewer is an agent published in the GitHub repository NYTC69/review-loop (3 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 27 tokens to every session and 697 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

system-architect

Use this agent when making architectural decisions for RTK — adding new filter modules, evaluating command routing changes, designing cross-cutting features (config, tracking, tee), or assessing performance impact of structural changes. Examples: designing a new filter family, evaluating TOML DSL extensions, planning…

rtk-ai/rtk · 0 tokens

model-compatibility

Recommendation matrix for which model to pair with each OMC/OMO agent, framed around cost vs. quality. This page exists so the recurring "어떤 모델을 어느 agent에 박아야 함?" question stops being tribal Discord knowledge.

Yeachan-Heo/oh-my-claudecode · 0 tokens

seo-flow

FLOW framework prompt analyst. Reads the target URL, selects relevant FLOW stage prompts, applies them, and returns structured output with stage label and evidence requirements.

AgriciDaniel/claude-seo · 33 tokens

seo-local

Local SEO specialist. Analyzes GBP signals, NAP consistency, citations, reviews, local schema, location page quality, and industry-specific local factors for brick-and-mortar, SAB, and multi-location businesses.

AgriciDaniel/claude-seo · 46 tokens

seo-drift

SEO drift analysis agent. Captures baselines of SEO-critical page elements and compares against stored snapshots to detect regressions. Reports changes with severity classification. Only spawned when a drift baseline exists for the URL.

AgriciDaniel/claude-seo · 45 tokens

audit-creative

Cross-platform creative specialist. Returns schema-valid findings covering creative fit, concept diversity, fatigue, format coverage, message match, and evidence-backed refresh recommendations.

AgriciDaniel/claude-ads · 34 tokens