PY

python-review

Review Python code for regressions, security gaps, and concurrency hazards.

Install

mkdir -p .claude/skills/python-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10538" && unzip -o skill.zip -d .claude/skills/python-review && rm skill.zip

Installs to .claude/skills/python-review

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Review Python code for correctness, reliability, security, performance, type/async pitfalls, and missing test coverage.
119 charsno explicit “when” trigger
Advanced

Key capabilities

  • Identify logic bugs and edge-case failures
  • Detect exception handling gaps and resource leaks
  • Uncover concurrency and async hazards
  • Pinpoint injection risks and insecure deserialization
  • Find accidental quadratic behavior and N+1 query patterns
  • Check for missing tests and flaky test risks

How it works

The skill performs a high-signal Python code review, prioritizing correctness, reliability, security, performance, and Python-specific quality issues, then identifies test gaps.

Inputs & outputs

You give it
Changed Python files, diff summary, or paths to Python modules
You get back
Findings ordered by severity, open questions, test gaps, and a brief summary

When to use python-review

  • Reviewing Python PRs
  • Debugging performance issues
  • Checking security in Python code

About this skill

Python Code Review

What This Skill Does

This skill performs high-signal Python code review focused on defects, regressions, and missing tests rather than style-only feedback.

When To Use

  • Reviewing pull requests or changed Python files.
  • Investigating potential runtime failures, edge-case bugs, or security weaknesses.
  • Validating test coverage for changed behavior.

Mission

  • Prioritize high-signal defects over style nits.
  • Focus on behavioral regressions, runtime failure modes, and missing test coverage.
  • Provide concise, actionable review comments with evidence.

Review Priorities

  1. Correctness and regressions:
  • Logic bugs and edge-case failures.
  • Off-by-one errors, wrong conditions, and incorrect defaults.
  • API contract breaks and backward compatibility issues.
  1. Reliability and safety:
  • Exception handling gaps.
  • Resource leaks (files, sockets, DB sessions).
  • Concurrency and async hazards (race conditions, blocking calls in async paths).
  1. Security:
  • Injection risks (SQL, shell, template).
  • Insecure deserialization and unsafe eval/exec usage.
  • Secret exposure and weak authz/authn logic.
  1. Performance:
  • Accidental quadratic behavior.
  • N+1 query patterns.
  • Unbounded memory growth and expensive hot-path operations.
  1. Python-specific quality:
  • Type-hint inconsistencies and unsafe Any propagation.
  • Dataclass/pydantic validation pitfalls.
  • Mutable default arguments.
  • Timezone-naive datetime handling.
  • Incorrect truthiness checks on containers/optionals.
  1. Tests:
  • Missing tests for changed behavior.
  • Missing negative-path and edge-case coverage.
  • Flaky test risk indicators.

Constraints

  • Do not rewrite large sections unless explicitly requested.
  • Do not focus on formatting-only feedback unless it hides a real defect.
  • If a claim cannot be proven from code context, mark it as a risk or assumption.

Required Output Format

Return findings first, ordered by severity:

  1. Findings
  • Use severity labels: Critical, High, Medium, Low.
  • For each finding include:
    • Title
    • Why it matters
    • Evidence (file and line)
    • Suggested fix
  1. Open Questions or Assumptions
  • Unknowns that affect confidence.
  1. Test Gaps
  • Specific tests to add, with scenario names.
  1. Brief Summary
  • One short paragraph only.

Finding Quality Bar

A finding is valid only if it has all of:

  • Clear impact.
  • Concrete evidence location.
  • A realistic fix suggestion.

Suggested Tone

  • Direct and technical.
  • Specific and non-judgmental.
  • Minimize style commentary unless tied to defects.

When not to use it

  • When the request is to rewrite large sections of code
  • When the focus is solely on formatting-only feedback
  • When a claim cannot be proven from code context

Limitations

  • Does not rewrite large sections unless explicitly requested
  • Does not focus on formatting-only feedback unless it hides a real defect
  • A finding is valid only if it has clear impact, concrete evidence, and a realistic fix suggestion

How it compares

This skill focuses on identifying high-signal defects, regressions, and missing tests in Python code, providing actionable feedback with evidence, unlike a general style-focused review.

Compared to similar skills

python-review side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
python-review (this skill)03moNo flagsAdvanced
python-testing-patterns772moReviewIntermediate
validation03moReviewAdvanced
pr-review62moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry