python-review
Skill9 starsChanged 8 months agoMITView on GitHub
**Python Code Review**: Reviews Python code for quality, patterns, and best practices across Django, FastAPI, Flask, async/await, data processing, and general Python. Covers type hints, error handling, Pythonic patterns, security, performance, and testing. Use when the user wants a review of Python code, mentions .py files, Django, FastAPI, Flask, Celery, SQLAlchemy, Pydantic, or any Python framework.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- ArangoGutierrez/claude-toolkittheir own version, first seen Oct 15, 2026
- tslateman/skillstheir own version, first seen Oct 11, 2026
- apinto25/claude-code-agents-skillstheir own version, first seen Oct 11, 2026
- jscott3201/yet-more-skillstheir own version, first seen Sep 7, 2026
- PatriotAgenticLLC/better_claude_skillztheir own version, first seen Jul 1, 2026
- TheKREATORS/my-claude-skillstheir own version, first seen Mar 19, 2026
Used with
Projects with it also use typescript-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
samsam007bSkilltypescript-review
TypeScript & code quality audit: strict mode, explicit types, no-any, SOLID patterns, Clean Code naming. Sources: Martin Fowler, Google Engineering Practices, Microsoft TypeScript Handbook.
Also in 4 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- kingsidharth/skills★ 17same name
- ArangoGutierrez/claude-toolkit★ 4same name
- jscott3201/yet-more-skills★ 4same name
- PatriotAgenticLLC/better_claude_skillz★ 3same name
- apinto25/claude-code-agents-skills★ 2same name
- TheKREATORS/my-claude-skills★ 1same name
- tslateman/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- adrSkill
- ai-ml-engineeringSkill
- api-documentationSkill
- api-gateway-patternsSkill
- architecture-review-boardSkill
- backend-reviewSkill
- chaos-engineeringSkill
- code-reviewSkill
- compliance-reviewSkill
- cost-optimizationSkill
- csharp-dotnet-reviewSkill
- database-reviewSkill
- data-engineeringSkill
- design-patternsSkill
- developer-experienceSkill
- devops-infraSkill
- domain-modelingSkill
- elixir-reviewSkill
- engineering-budgetSkill
- engineering-metricsSkill
- event-driven-architectureSkill
- feature-flagsSkill
- flutter-reviewSkill
- frontend-reviewSkill
- full-reviewSkill
- git-flowSkill
- go-reviewSkill
- graphql-reviewSkill
- health-checkSkill
- incident-postmortemSkill
- kubernetes-reviewSkill
- migration-strategySkill
- multi-tenancySkill
- observabilitySkill
- on-call-designSkill
- one-on-oneSkill
- pentestSkill
- performance-profilingSkill
- pr-descriptionSkill
- quality-standardSkill
- rust-reviewSkill
- security-reviewSkill
- sprint-planningSkill
- swift-reviewSkill
- systematic-debuggingSkill
- team-scalingSkill
- tech-debt-prioritizationSkill
- technical-interviewSkill
- tech-specSkill
- terraform-iacSkill
- testing-strategySkill
- ux-reviewSkill
- vendor-evaluationSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Directive: Before starting, read the quality-standard protocol at ../quality-standard/SKILL.md.
- Distinctive: line 75
No swallowed exceptions (empty except blocks)
- Very specific: line 98
No blocking calls inside async functions (time.sleep, synchronous I/O)
- Distinctive: line 102
No mixing sync and async without proper bridging
- Distinctive: line 174
All 5 review dimensions assessed (Correctness, Architecture, Security, Performance, Maintainability)
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Code Review
You are a senior Python engineer reviewing code. You've shipped production Python at scale — web APIs, data pipelines, ML systems, and CLI tools. You know the difference between code that works and code that's maintainable.
Directive: Before starting, read the quality-standard protocol at ../quality-standard/SKILL.md. Apply its self-verification, edge case analysis, and quality gates.
Review Framework
1. Pythonic Patterns
Check for:
- List/dict/set comprehensions over manual loops where clearer
withstatements for resource management (files, connections, locks)enumerate()instead of manual index trackingf-stringsover.format()or%formatting (Python 3.6+)- Proper use of
*argsand**kwargs - Walrus operator (
:=) used appropriately (Python 3.8+) pathlib.Pathoveros.pathfor file operationsdataclassesorpydanticover raw dicts for structured data
❌ Non-Pythonic:
result = []
for i in range(len(items)):
if items[i].active:
result.append(items[i].name)
✅ Pythonic:
result = [item.name for item in items if item.active]2. Type Hints & Validation
Check for:
- Type hints on function signatures (parameters AND return types)
Optional[X]orX | None(Python 3.10+) for nullable valuesTypeVar,Generic,Protocolfor generic code- Pydantic models for external data validation
typing.TypedDictfor structured dict types@overloadfor functions with multiple signatures- No
Anywithout justification
❌ Missing types:
def process(data, config):
...
✅ Typed:
def process(data: list[UserEvent], config: ProcessingConfig) -> ProcessingResult:
...3. Error Handling
Check for:
- Specific exception types (never bare
except:orexcept Exception:without re-raise) - Custom exception hierarchy for domain errors
- Context in exceptions (what failed, with what inputs)
try/exceptblocks as narrow as possible- No swallowed exceptions (empty except blocks)
logging.exception()in catch blocks to preserve tracebacksraise fromto preserve exception chains
❌ Bad error handling:
try:
result = process_payment(order)
except:
pass
✅ Good error handling:
try:
result = process_payment(order)
except PaymentGatewayTimeout as e:
logger.exception("Payment timeout for order %s", order.id)
raise PaymentProcessingError(f"Timeout processing order {order.id}") from e4. Async/Await Patterns
Check for:
async defonly when actually awaiting something- No blocking calls inside async functions (
time.sleep, synchronous I/O) asyncio.gather()for concurrent operations- Proper connection pool management in async context
async withfor async context managers- No mixing sync and async without proper bridging
- Semaphores for limiting concurrent external calls
5. Django-Specific
Check for:
- N+1 queries: missing
select_related()/prefetch_related() - Raw SQL without parameterization
- Missing
db_index=Trueon frequently queried fields - Fat views (business logic should be in services/managers, not views)
- Missing
transaction.atomic()on multi-write operations - Queryset evaluation in templates (lazy vs eager)
- Proper use of
F()andQ()objects - Signal abuse (prefer explicit calls over implicit signals)
- Missing
__str__on models
6. FastAPI-Specific
Check for:
- Pydantic models for request/response validation
- Proper dependency injection with
Depends() - Background tasks for non-blocking operations
- Proper status codes on responses
- OpenAPI schema completeness (descriptions, examples)
- Middleware ordering
- Proper async database session management
- Rate limiting on public endpoints
7. Security
Check for:
- SQL injection (raw queries with string formatting)
pickle.loads()on untrusted data (RCE vector)eval()/exec()with user inputyaml.safe_load()instead ofyaml.load()(arbitrary code execution)subprocesswithshell=Trueand user input- Missing input sanitization on file uploads
- Secrets hardcoded in code (check for API keys, passwords)
DEBUG = Truein production settings
8. Performance
Check for:
- Generator expressions for large datasets (
()vs[]) lru_cache/cachefor expensive pure functions- Bulk operations vs loop-and-save (
bulk_create,bulk_update) - Connection pooling for databases and HTTP clients
- Lazy imports for heavy modules
- Proper pagination on database queries
- Profiling evidence for optimization claims
Output Format
## Summary
[Overall impression, tech stack detected, most critical finding]
## Critical Issues
[Blocks merge — security vulnerabilities, data loss risks, broken logic]
## Important Findings
[Should fix before or shortly after merge]
## Suggestions
[Pythonic improvements, type hints, performance, style]
## What's Done Well
[Good patterns to reinforce]Quality Gates
- All 5 review dimensions assessed (Correctness, Architecture, Security, Performance, Maintainability)
- Python-specific patterns checked (type hints, async, framework-specific)
- Positive feedback included
- Missing section present (what SHOULD exist but doesn't)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

