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.zipInstalls 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.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
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
- 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.
- Reliability and safety:
- Exception handling gaps.
- Resource leaks (files, sockets, DB sessions).
- Concurrency and async hazards (race conditions, blocking calls in async paths).
- Security:
- Injection risks (SQL, shell, template).
- Insecure deserialization and unsafe eval/exec usage.
- Secret exposure and weak authz/authn logic.
- Performance:
- Accidental quadratic behavior.
- N+1 query patterns.
- Unbounded memory growth and expensive hot-path operations.
- 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.
- 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:
- Findings
- Use severity labels: Critical, High, Medium, Low.
- For each finding include:
- Title
- Why it matters
- Evidence (file and line)
- Suggested fix
- Open Questions or Assumptions
- Unknowns that affect confidence.
- Test Gaps
- Specific tests to add, with scenario names.
- 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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| python-review (this skill) | 0 | 3mo | No flags | Advanced |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| validation | 0 | 3mo | Review | Advanced |
| pr-review | 6 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
validation
aidotters
コード品質検証と受け入れテストの共通ロジック。validate-code と acceptance-test スキルから使用。
pr-review
pytorch
Review PyTorch pull requests for code quality, test coverage, security, and backward compatibility. Use when reviewing PRs, when asked to review code changes, or when the user mentions "review PR", "code review", or "check this PR".
pytest
prowler-cloud
Pytest testing patterns for Python. Trigger: When writing or refactoring pytest tests (fixtures, mocking, parametrize, markers). For Prowler-specific API/SDK testing conventions, also use prowler-test-api or prowler-test-sdk.
python-anti-patterns
wshobson
Common Python anti-patterns to avoid. Use as a checklist when reviewing code, before finalizing implementations, or when debugging issues that might stem from known bad practices.
code-change-verification
openai
Run the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents Python repository.