review-python
БесплатноБез исполняемых скриптовНе проверенPerforms comprehensive Python backend code reviews across FastAPI, SQLAlchemy, PostgreSQL, and pytest with optional parallel subagents. Use when reviewing…
от existential-birds★ 92 звезды на GitHubОб этом скилле
Python Backend Code Review
Hard gates (sequence)
Advance only when each pass condition is objectively satisfied (prevents linter-owned false positives and ungrounded findings):
| Gate | Pass condition |
|---|---|
| G1 — Diff scope | Step 1 command has been run; the changed .py paths are enumerated in writing (list may be empty — if empty, state that explicitly and do not invent Python findings). |
| G2 — Linters before manual style/type | For ruff and mypy: either no project config exists for that tool, or it was run on the changed files and you captured pass/fail (exit code or clear tool output). Do not add manual style or type findings for rules those tools already enforce when configured. |
| G3 — Protocol and domain skills | Load review-verification-protocol (review-verification-protocol) and fastapi-code-review (fastapi-code-review) (when FastAPI is used) plus any detected domain skills before Step 6 substantive review. |
| G4 — Evidence per issue | Step 7 checks are satisfied for each reported issue before it appears in the final list (re-read source, search references for "unused", confirm framework handling for "missing", verify syntax against current docs). |
| G5 — Output contract | Findings use sequential numbering, every issue has FILE:LINE, and the Verdict follows Step 8 (Critical/Major only block; Minor/Informational do not). |
Arguments
--parallel: If the agent supports subagents, run a specialized subagent per technology area (otherwise reviews run sequentially with identical output)- Path: Target directory (default: current working directory)
Step 1: Identify Changed Files
Pass (G1): Capture the command output (or equivalent) as your authoritative changed-.py set before Steps 2–3.
git diff --name-only $(git merge-base HEAD main)..HEAD | grep -E '\.py$'
Step 2: Verify Linter Status
CRITICAL: Run project linters BEFORE flagging any style or type issues. Pass (G2): You may only proceed to Step 3 after each configured linter has been run on the changed files or you have recorded why it was skipped (missing config).
# Check if ruff config exists and run it
if [ -f "pyproject.toml" ] || [ -f "ruff.toml" ]; then
ruff check <changed_files>
fi
# Check if mypy config exists and run it
if [ -f "pyproject.toml" ] || [ -f "mypy.ini" ]; then
mypy <changed_files>
fi
Rules:
- If a linter passes for a specific rule (e.g., line length), DO NOT flag that issue manually
- Linter configuration is authoritative for style rules
- Only flag issues that linters cannot detect (semantic issues, architectural problems)
Why: Analysis of 24 review outcomes showed 4 false positives (17%) where reviewers flagged line-length violations that ruff check confirmed don't exist. The linter's configuration reflects intentional project decisions.
Step 3: Detect Technologies
# Detect FastAPI
grep -r "from fastapi\|APIRouter\|FastAPI(" --include="*.py" -l | head -3
# Detect SQLAlchemy
grep -r "from sqlalchemy\|Session\|relationship\|mapped_column" --include="*.py" -l | head -3
# Detect Postgres-specific
grep -r "psycopg\|asyncpg\|JSONB\|GIN" --include="*.py" -l | head -3
# Check for test files
git diff --name-only $(git merge-base HEAD main)..HEAD | grep -E 'test.*\.py$|conftest\.py$'
Step 4: Load Verification Protocol
Load the review-verification-protocol skill (review-verification-protocol) and keep its checklist in mind throughout the review.
Step 5: Load Domain Skills
Load each applicable skill (read its SKILL.md) before reviewing its domain:
| Condition | Skill |
|---|---|
| FastAPI detected | fastapi-code-review (fastapi-code-review) |
| Test files changed | pytest-code-review (pytest-code-review) |
| SQLAlchemy detected | sqlalchemy-code-review (sqlalchemy-code-review) |
| Postgres detected | postgres-code-review (postgres-code-review) |
Step 6: Review
If the agent supports subagents, dispatch one per technology area in parallel; otherwise run the same areas sequentially, producing identical output.
Sequential (default, or when subagents are unavailable):
- Load applicable skills
- Review Python logic, typing, async, and error handling issues first
- Review FastAPI patterns (if detected)
- Review detected technology areas (SQLAlchemy, Postgres, pytest)
- Consolidate findings
Parallel (--parallel flag, when the agent supports subagents):
- Detect all technologies upfront
- Dispatch one subagent per technology area
- Each subagent loads its skill and reviews its domain
- Wait for all subagents
- Consolidate findings
Before F
Установить review-python в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл review-python?
Performs comprehensive Python backend code reviews across FastAPI, SQLAlchemy, PostgreSQL, and pytest with optional parallel subagents. Use when reviewing Python PRs, backend changes, or .py files.
Как установить скилл review-python?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл review-python запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This 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…
от Anthropic