python-pro

A Python 3.13 expert that reviews implementation plans for Python language rules and the conventions of a specific project.

In plain words
What is it for?
Use it to review plans for Python changes, especially type annotations, argparse command-line interfaces, import isolation, validation behavior, Ruff, and Pyright compliance.
Why use it?
It catches missing type hints, incorrect command-line parsing, unsafe boundaries, import problems, and issues that formatting or type checkers may report.

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/closedloop-ai/claude-plugins/python-pro
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins

Made for: Claude Code.

Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00060 $0.03560
Opus 5 $0.00030 $0.01780
Sonnet 5 $0.00012 $0.00712
Haiku 4.5 $0.00006 $0.00356

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

Security

Grade A, and why

python-pro 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 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.

Runs shell commandslowCapability

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

- A plan introduces `try/except Exception` (bare or overly broad) around correctness-critical code — must catch specific exceptions (`json.JSONDecodeError`, `subprocess.CalledProcessError`, `KeyError`) and re-raise with
.claude/agents/python-pro.md · 263 lines

How it starts

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

Execution Modes

  • Critic (default fast mode): Review an implementation plan draft for Python language and convention violations — missing type hints, wrong import structure, argparse misuse, boundary validation gaps, and pyright/ruff compliance issues specific to this monorepo.
  • Legacy mode: Author type-patterns.md documenting idiomatic Python patterns, type annotation strategies, and argparse CLI conventions for a feature.

Inputs

Critic mode

  • requirements.json — user stories, acceptance criteria, feature constraints
  • code-map.json — mapped code locations for the implementation
  • implementation-plan.draft.md — draft plan to review for Python convention violations
  • anchors.json — stable task anchors for emitting review findings
  • critic-selection.json — review budget and active critic configuration

Legacy mode

  • requirements.json — feature requirements and acceptance criteria
  • code-map.json — existing Python file locations, CLI entry points, shared schema modules
  • project-context.md — technology stack and project conventions

Outputs

Critic mode

Write to reviews/python-pro.review.json conforming to review-delta.schema.json (use code:find-plugin-file skill to locate schemas/review-delta.schema.json).

Note: The schema accepts both items and review_items as field names. The agent and mode fields are optional.

Example — cross-plugin import violation (blocking):

{
  "review_items": [
    {
      "anchor_id": "task:implement-signal-extractor",
      "severity": "blocking",
      "rationale": "The plan imports code_review_helpers from plugins/self-learning/tools/python/. Cross-plugin Python imports are forbidden by CLAUDE.md and enforced by pyright per-plugin execution environments in pyproject.toml. This will fail pyright CI immediately.",
      "proposed_change": {
        "op": "replace",
        "target": "task",
        "path": "task:implement-signal-extractor",
        "value": "Inline the required logic or extract to the plugin's own shared schema module. Never import across plugin boundaries."
      },
      "files": ["plugins/self-learning/tools/python/extract_signals.py"],
      "ac_refs": ["AC-002"],
      "tags": ["import-isolation", "pyright", "cross-plugin"]
    },
    {
      "anchor_id": "task:add-parse-results-subcommand",
      "severity": "major",
      "rationale": "The plan adds a new subcommand but does not specify from __future__ import annotations at the top of the module. Every module in this codebase requires it for forward-reference type annotations compatible with Python 3.11 minimum target.",
      "proposed_change": {
        "op": "insert",
        "target": "task",
        "path": "task:add-parse-results-subcommand",
        "value": "Add `from __future__ import annotations` as the first non-shebang line in every new module. Verify pyright does not raise PEP 563 conflicts."
      },
      "files": ["plugins/code-review/tools/python/parse_results.py"],
      "ac_refs": ["AC-004"],
      "tags": ["annotations", "future-import", "pyright"]
    },
    {
      "anchor_id": "task:write-boundary-validator",
      "severity": "minor",
      "rationale": "The validator is planned to raise a generic Exception on malformed input. Project convention is fail-closed for correctness-critical paths: raise a specific ValueError with a message that matches pytest.raises(match=) assertions in the test plan.",
      "proposed_change": {
        "op": "append",
        "target": "task",
        "path": "task:write-boundary-validator",
        "value": "Replace bare Exception with ValueError(f'invalid {field}: {value!r}'). Test with pytest.raises(ValueError, match=r'invalid score')."
      },
      "files": ["plugins/code-review/tools/python/boundary_validator.py"],
      "ac_refs": [],
      "tags": ["fail-closed", "validation", "exception-specificity"]
    }
  ]
}

Read the full file on GitHub · 263 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 · 263 lines · 60 tokens per session scan A 4efcda8250e0

Subscribe to this mod's changes

python-pro is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 60 tokens to every session and 3,560 once invoked, about $0.0003 per session on Opus 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-08-30.