python-review

python-review is a skill for Claude Code, Codex from camilooscargbaptista/cto-toolkit. It costs 95 tokens per session (1,417 once invoked), scanned A, original, MIT.

A review guide for Python code across web frameworks, asynchronous programs, data processing, and general applications. It checks readability, type hints, errors, security, performance, and testing practices.

In plain words
What is it for?
Use it to review Python files, including Django, FastAPI, Flask, async code, data pipelines, and command-line programs.
Why use it?
It helps find code that works but is difficult to maintain, unsafe, slow, or inconsistent with common Python practices. It also requires a quality-standard review process before starting.

Skill for Claude CodeCodex

Part of the cto-toolkit plugin — 51 skills, 6 agents, 3 hooks 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 skills/camilooscargbaptista/cto-toolkit/python-review
Any agent
npx skills add camilooscargbaptista/cto-toolkit --skill python-review
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code, Codex.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 51 skills, 6 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/python-review.svg)](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/python-review)
Your own site
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/python-review"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/python-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,417 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.00095 $0.01417
Opus 5 $0.00048 $0.00709
Sonnet 5 $0.00019 $0.00283
Haiku 4.5 $0.00010 $0.00142

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

Security

Grade A, and why

python-review 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 3d 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.

python-review/SKILL.md · 178 lines

How it starts

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

Python Code Review

You are a senior Python engineer reviewing code. You've shipped production Python at scale — web APIs, data pipelines, ML systems, and CLI tools. You know the difference between code that works and code that's maintainable.

Directive: Before starting, read the quality-standard protocol at ../quality-standard/SKILL.md. Apply its self-verification, edge case analysis, and quality gates.

Review Framework

1. Pythonic Patterns

Check for:

  • List/dict/set comprehensions over manual loops where clearer
  • with statements for resource management (files, connections, locks)
  • enumerate() instead of manual index tracking
  • f-strings over .format() or % formatting (Python 3.6+)
  • Proper use of *args and **kwargs
  • Walrus operator (:=) used appropriately (Python 3.8+)
  • pathlib.Path over os.path for file operations
  • dataclasses or pydantic over raw dicts for structured data
❌ Non-Pythonic:
result = []
for i in range(len(items)):
    if items[i].active:
        result.append(items[i].name)

✅ Pythonic:
result = [item.name for item in items if item.active]

2. Type Hints & Validation

Check for:

  • Type hints on function signatures (parameters AND return types)
  • Optional[X] or X | None (Python 3.10+) for nullable values
  • TypeVar, Generic, Protocol for generic code
  • Pydantic models for external data validation
  • typing.TypedDict for structured dict types
  • @overload for functions with multiple signatures
  • No Any without justification
❌ Missing types:
def process(data, config):
    ...

✅ Typed:
def process(data: list[UserEvent], config: ProcessingConfig) -> ProcessingResult:
    ...

3. Error Handling

Check for:

  • Specific exception types (never bare except: or except Exception: without re-raise)
  • Custom exception hierarchy for domain errors
  • Context in exceptions (what failed, with what inputs)
  • try/except blocks as narrow as possible
  • No swallowed exceptions (empty except blocks)
  • logging.exception() in catch blocks to preserve tracebacks
  • raise from to preserve exception chains

Read the full file on GitHub · 178 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. 3d ago First seen · 178 lines · 95 tokens per session scan A 02eaf3f5edb8

Subscribe to this mod's changes

python-review is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 95 tokens to every session and 1,417 once invoked, about $0.0005 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 skills, from other repositories

py-clean-arch

Use this skill when the user asks about Clean Architecture in Python — not generic theory, but the specific layer conventions (l1entities, l2usecases, l3interfaceadapters, l4frameworksanddrivers), folder patterns, boundary interfaces, and .importlinter.ini contracts from CJHwong/py-clean-architecture-examples. Fetches…

CJHwong/py-clean-architecture-examples · 113 tokens

software-supply-chain-failures

Expert guidance on detecting, assessing, and remediating Software Supply Chain Failures (OWASP A03:2025) in Python applications — the highest-exploit-score category in the 2025 OWASP Top 10. Use this skill whenever the user mentions dependency scanning, vulnerable packages, SBOMs, pip-audit, safety check, lockfile…

scholarly360/owasp-top10-web-skills · 151 tokens

pytest

Skill "pytest" from bobmatnyc/claude-mpm, covering pytest - professional python testing, basic pytest, with common plugins, for fastapi testing and for django testing.

bobmatnyc/claude-mpm · 28 tokens

mypy

Skill "mypy" from bobmatnyc/claude-mpm, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.

bobmatnyc/claude-mpm · 24 tokens

pytest

Skill "pytest" from bobmatnyc/claude-mpm-skills, covering pytest - professional python testing, basic pytest, with common plugins, for fastapi testing and for django testing.

bobmatnyc/claude-mpm-skills · 28 tokens

mypy

Skill "mypy" from bobmatnyc/claude-mpm-skills, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.

bobmatnyc/claude-mpm-skills · 24 tokens