python-code-review

Review Python code for type hints, async patterns, and error handling.

75|9|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/anderskev/beagle --skill python-code-review-anderskev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-code-review
Source: https://github.com/anderskev/beagle/tree/main/skills/python-code-review
Command: npx skills add https://github.com/anderskev/beagle --skill python-code-review-anderskev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It guides reviewing Python code for type hints, safe async usage, and error handling, reducing bugs and improving maintainability.

Core Features & Use Cases

  • Type Safety: Check for type hints and proper Optional/Union usage.
  • Async Patterns: Validate awaits, avoid blocking calls in async code.
  • Error Handling: Enforce contextual exceptions and logging.

Quick Start

Run the Python code-review checklist against your modules to surface type and async issues.

Frequently Asked Questions about python-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Python code for type safety issues?

Type safety review checks for complete type hints on function parameters and return values, validates Optional and Union types, and flags missing annotations. This catches type mismatches early and improves code maintainability by making intent explicit.

What async patterns should I validate in Python code?

Async validation ensures coroutines are awaited properly, detects blocking calls in async functions, and prevents synchronous operations in async contexts. Correct async patterns prevent deadlocks and resource leaks in concurrent applications.

How do I enforce proper error handling in Python reviews?

Error handling review prohibits bare except clauses, mandates logger usage over print statements, and enforces exception chaining to preserve context. Proper error handling enables debugging and maintains exception stack traces for diagnostics.

What common Python mistakes does code review catch?

Code review flags missing type hints, improper async/await usage, bare excepts, print-based logging, and lost exception context. These checks surface bugs before they reach production and enforce consistency across Python projects.

Can I use code review on existing Python projects?

Yes, code review applies to Python project files (.py modules) regardless of size or stage. Run the checklist against your codebase to surface type, async, and error-handling issues across all modules at once.