py-critique

py-critique is a command for coding agents from mathisk2095/jko-claude-plugins. It costs 29 tokens per session (717 once invoked), scanned A, original, MIT.

A command for deeply reviewing Python backend architecture and code quality.

In plain words
What is it for?
It critiques Litestar or FastAPI applications, maps their dependencies, checks SOLID design and layer boundaries, and scans for listed anti-patterns.
Why use it?
It finds tangled layers, repeated or AI-generated patterns, oversized files, and design mistakes that make a backend harder to maintain.

Command

Part of the python-backend plugin — 1 skill, 3 commands shipped together

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 commands/mathisk2095/jko-claude-plugins/py-critique
Clone the repo
git clone --depth 1 https://github.com/mathisk2095/jko-claude-plugins

Or install python-backend, the plugin that ships this one along with the rest of its 1 skill, 3 commands.

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 py-critique

README.md
[![agentmods](https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/py-critique.svg)](https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/py-critique)
Your own site
<a href="https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/py-critique"><img src="https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/py-critique.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 717 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.1 $0.00029 $0.00717
Opus 5 $0.00015 $0.00358
Sonnet 5 $0.00006 $0.00143
Haiku 4.5 $0.00003 $0.00072

Measured 5d ago against content hash 969198df4407, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

py-critique 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 5d 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/python-backend/commands/py-critique.md · 78 lines

How it starts

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

Conduct a comprehensive architecture critique of the Python backend code. If $ARGUMENTS is provided, focus on that module, file, or feature area. Otherwise critique the entire backend.

First: Use the python-backend-expert skill for all design principles, patterns, and anti-patterns.

Critique Process

  1. Detect framework: Litestar (Controllers, Provide) or FastAPI (routers, Depends). Adapt terminology.

  2. Map the architecture:

    • Read the composition root (app.py, main.py, or container.py) to understand DI wiring
    • Identify the layer structure: entrypoints / application / domain / infrastructure
    • Trace the dependency graph: what imports what?
  3. AI Slop Detection (start here): Run the detection checklist from references/ai-slop.md. Check for AS-01 through AS-12.

  4. Review each layer using the python-backend-expert skill's review checklist (all 13 points).

  5. Check file sizes: Flag any module >300 lines as a candidate for splitting. Flag >500 as urgent.

  6. Anti-pattern scan: Check for AP-01 through AP-22 from references/anti-patterns.md.

Output Format

AI Slop Verdict

Start here. Pass/fail: Does this code look AI-generated? Run the detection checklist. Be brutally honest. List specific tells with file and line. If 3+ tells are found, the code needs architectural review.

Architecture Map

Brief overview of detected architecture (layers, DI approach, framework).

What's Working Well

Highlight 2-4 patterns done correctly. Reinforce good architecture.

Priority Issues

Top 5-8 issues, ordered by severity (blocking > important > nit):

For each:

  • What: Name the problem with anti-pattern ID (AP-xx or AS-xx)
  • Where: File path and line
  • Why it matters: Concrete consequence
  • Fix: Specific code change or restructuring needed
  • Command: Which command to use (/py-harden, /py-structure)

File Size Report

List any files >300 lines with line count and suggested split strategy.

Read the full file on GitHub · 78 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. 5d ago First seen · 78 lines · 29 tokens per session scan A 969198df4407

Subscribe to this mod's changes

py-critique is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 717 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.