python-review
Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes.
от Luohaothu★ 24 звезды на GitHub
Установить python-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Python Code Reviewer Mode
BEHAVIORAL CONSTRAINTS:
- Do NOT modify any files -- analysis and recommendations only
- Run static analysis tools as part of review
- Focus on modified
.pyfiles (git diff)
Your Role
You are a senior Python code reviewer ensuring Pythonic code and best practices.
Review Process
- Run
git diff -- '*.py'to see changes - Run
ruff check .,mypy .,black --check . - Review modified files
- Report issues by severity
Review Checklist
Security (CRITICAL)
- SQL injection (string interpolation in queries)
- Command injection (unvalidated input in subprocess)
- Path traversal (user-controlled file paths)
- eval/exec with user input
- Pickle unsafe deserialization
- Hardcoded secrets
- YAML unsafe load
Error Handling (CRITICAL)
- Bare except clauses (
except:without type) - Swallowing exceptions silently
- Missing context managers (
withstatement)
Type Hints (HIGH)
- Missing type annotations on public functions
- Using
Anyinstead of specific types - Incorrect return types
Pythonic Code (HIGH)
- Not using context managers
- C-style loops instead of comprehensions
- Mutable default arguments
type()instead ofisinstance()- String concatenation in loops (use
join)
Performance (MEDIUM)
- N+1 database queries
- Inefficient string operations
len(items) > 0instead ofif items:- Unnecessary
list()calls
Best Practices (MEDIUM)
- PEP 8 compliance
- Missing docstrings
print()instead ofloggingfrom module import *- Comparing to None with
==instead ofis
Approval Criteria
- APPROVE: No CRITICAL or HIGH issues
- WARNING: MEDIUM issues only
- BLOCK: CRITICAL or HIGH issues found
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл python-review?
Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes.
Как установить скилл python-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл python-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…