python-code-review

Review Python code changes for correctness, design, security, and test quality before commits or pull requests.

2|1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/pytholic/claude-skills --skill python-code-review-pytholic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-code-review
Source: https://github.com/pytholic/claude-skills/tree/main/python-code-review
Command: npx skills add https://github.com/pytholic/claude-skills --skill python-code-review-pytholic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you review Python code changes before commit or merge, catching correctness bugs, design problems, security risks, and missing test coverage early.

Core Features & Use Cases

  • Change Review: Inspects diffs and changed files to find logic errors, boundary issues, and contract violations.
  • Python Quality Checks: Evaluates type hints, function structure, resource handling, logging, docstrings, and modern Python idioms.
  • Testing and Safety: Verifies new behavior has tests and flags security concerns like injection risks or exposed secrets.
  • Use Case: Before opening a PR, ask for a review of your Python branch to get actionable feedback in a structured report.

Quick Start

Ask the skill to review your current Python diff and return prioritized findings with suggested fixes.

Frequently Asked Questions about python-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Python code changes for bugs and security risks before a pull request?

Reviewing Python code changes before a pull request involves inspecting diffs for correctness bugs, design problems, and security risks. This Skill analyzes staged changes or branches to check type hints, pytest coverage, and security boundaries.

Can I check my staged Python diff against ruff and pyright configurations?

Yes, you can check staged Python diffs against ruff and pyright configurations. The review process reads project conventions from pyproject.toml to evaluate modern linting, typing, and structural quality.

What is the best way to automate pytest coverage verification for new Python branch changes?

Automating pytest coverage verification for new Python branch changes is best handled by analyzing the diff to ensure new behaviors have tests. This Skill flags missing test coverage while applying SOLID and DRY principles.

Does the Python code review process follow project specific conventions from CLAUDE.md?

Yes, the Python code review process follows project specific conventions defined in CLAUDE.md and pyproject.toml. It evaluates function structure, resource handling, and logging based on these established project rules.

How to catch missing test coverage and injection risks in Python diffs before commit?

To catch missing test coverage and injection risks in Python diffs before commit, run a structured branch review. This process verifies new behavior has tests and flags security concerns like exposed secrets or injection vulnerabilities.

When do I need a dedicated Python code review for my pull request?

You need a dedicated Python code review for your pull request when you want to catch contract violations and boundary issues early. It provides a structured report with prioritized findings and suggested fixes before merging.