python-code-review
This skill systematically audits Python code across five key dimensions: PEP8 compliance, type annotation completeness, async/await correctness, exception handling rigor, and frequent pitfalls like mutable defaults. It provides a checklist-driven review workflow with reference guides for each category and context-sensitive rules to avoid false positives.
Python Code Review examines your Python files for type safety, async correctness, and error handling issues.
AI-generated summary based on this skill's SKILL.md
Install
existential-birds/beagle/python-code-review · repository language: TypeScript
git clone https://github.com/existential-birds/beagle
cp -r beagle/plugins/beagle-python/skills/python-code-review ~/.claude/skills/python-code-reviewFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What does python-code-review check for in type hints?
python-code-review reviews Python code for type safety and validates type annotations across function signatures, return types, and variable declarations. It ensures type hints are complete and correctly applied, helping catch type-related bugs before runtime.
Can python-code-review check a Python file for PEP8 style?
Yes. python-code-review checks Python file compliance with the PEP8 style guide, validating formatting, naming conventions, whitespace, line length, and other style standards to ensure your code follows Python community guidelines.
How does python-code-review validate async/await patterns?
python-code-review ensures proper async/await usage by detecting blocking calls in async functions, validating await placement, and checking for common async mistakes. It verifies that asynchronous code doesn't inadvertently block execution.
What error handling issues does python-code-review detect?
python-code-review validates error handling and exception patterns, including bare except clauses, overly broad exception catching, missing exception handlers, and improper error propagation. It promotes exception handling best practices.
Does python-code-review find common Python mistakes?
Yes. python-code-review detects common Python anti-patterns and mistakes such as mutable defaults in function arguments, improper imports organization, and other frequent pitfalls. It provides checklist-driven review with context-sensitive rules to minimize false positives.
What is python-code-review's license?
python-code-review is released under the Apache-2.0 license, allowing free use, modification, and distribution with appropriate attribution.
SKILL.md
rendered from the published skill — quoted content, verbatim
Python Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| Indentation, line length, whitespace, naming | references/pep8-style.md |
| Missing/wrong type hints, Any usage | references/type-safety.md |
| Blocking calls in async, missing await | references/async-patterns.md |
| Bare except, missing context, logging | references/error-handling.md |
| Mutable defaults, print statements | references/common-mistakes.md |
Review Checklist
PEP8 Style
- [ ] 4-space indentation (no tabs)
- [ ] Line length ≤79 characters (≤72 for docstrings/comments)
- [ ] Two blank lines around top-level definitions, one within classes
- [ ] Imports grouped: stdlib → third-party → local (blank line between groups)
- [ ] No whitespace inside brackets or before colons/commas
- [ ]
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 6 files
plugins/beagle-python/skills/python-code-review/SKILL.md
plugins/beagle-python/skills/python-code-review/references/async-patterns.md
plugins/beagle-python/skills/python-code-review/references/common-mistakes.md
plugins/beagle-python/skills/python-code-review/references/error-handling.md
plugins/beagle-python/skills/python-code-review/references/pep8-style.md
plugins/beagle-python/skills/python-code-review/references/type-safety.md