Back to Skills

python-code-review

verified

Reviews Python code for PEP8 compliance, type hints, modern best practices (Python 3.9+), and code quality. Detects anti-patterns, validates documentation, and provides severity-based recommendations. Integrates with modern tooling (ruff, mypy, uv).

View on GitHub

Marketplace

cc-marketplace

tasanakorn/cc-marketplace

Plugin

python-dev

development

Repository

tasanakorn/cc-marketplace
2stars

plugins/python-dev/skills/python-code-review/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/tasanakorn/cc-marketplace/blob/main/plugins/python-dev/skills/python-code-review/SKILL.md -a claude-code --skill python-code-review

Installation paths:

Claude
.claude/skills/python-code-review/
Powered by add-skill CLI

Instructions

# Python Code Review Skill

A specialized skill for reviewing Python code with focus on PEP8 compliance, type hints, modern best practices, and code quality.

## Overview

This skill enables Claude to autonomously review Python code for compliance with modern Python standards, including PEP8 style guidelines, type hint coverage, proper structure, and common anti-patterns. It promotes clean, maintainable, and type-safe Python code.

## Capabilities

When activated, this skill provides:

1. **PEP8 Compliance Review**
   - Check naming conventions (snake_case, PascalCase)
   - Verify line length (88 characters)
   - Review whitespace and indentation
   - Check import ordering and grouping
   - Validate docstring presence and format

2. **Type Hints Validation**
   - Ensure all functions have type hints
   - Check for proper return type annotations
   - Validate use of modern type syntax (list[], dict[] over List[], Dict[])
   - Verify Optional[] vs None union types
   - Check for Any types (discourage overuse)

3. **Code Structure & Organization**
   - Review module structure and imports
   - Check for proper `__init__.py` usage
   - Validate entry points (`__main__.py`)
   - Review function/class organization
   - Assess module coupling and cohesion

4. **Best Practices Enforcement**
   - Check for use of context managers (with statements)
   - Validate exception handling
   - Review string formatting (f-strings preferred)
   - Check for proper constant definitions
   - Assess use of comprehensions vs loops

5. **Common Anti-Patterns Detection**
   - Mutable default arguments
   - Bare except clauses
   - Using `global` keyword unnecessarily
   - Poor variable naming
   - Overly complex functions (high cyclomatic complexity)

6. **Documentation Quality**
   - Check for docstrings on public functions/classes
   - Validate docstring format (Google/NumPy style)
   - Review parameter documentation
   - Check for return value documentation
   - Assess example usage in docs

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
11015 chars