Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
existential-birds avatar

Python Code Review

  • 677 installs
  • 74 repo stars
  • Updated July 21, 2026
  • existential-birds/beagle

python-code-review is a Claude agent skill that audits Python files for PEP8 violations, missing type hints, unsafe async patterns, and common exception-handling mistakes before merge.

About

python-code-review is a structured Python review skill with four reference guides: pep8-style, type-safety, async-patterns, and error-handling. The skill checks indentation, line length, naming, missing or incorrect type hints including Any misuse, blocking calls inside async code, missing await usage, bare except clauses, and weak logging practices when reviewing .py files. Developers reach for python-code-review during pull request review or agent-driven audits before merging Python services. The quick-reference table routes each issue type to focused markdown references so reviews stay consistent across modules.

  • Reviews .py files against 5 reference checklists: PEP8 style, type safety, async patterns, error handling, and common mi
  • Enforces 4-space indentation, ≤79 char lines, proper import grouping, and snake_case naming
  • Flags missing type hints, inappropriate use of Any, blocking calls in async code, and bare except clauses
  • Checks for mutable defaults, stray print statements, missing context managers, and poor logging
  • Delivers severity-classified findings that feed directly into code-quality gates

Python Code Review by the numbers

  • 677 all-time installs (skills.sh)
  • Ranked #194 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/existential-birds/beagle --skill python-code-review

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs677
repo stars74
Security audit3 / 3 scanners passed
Last updatedJuly 21, 2026
Repositoryexistential-birds/beagle

How do you review Python code for type and async issues?

Automatically audit Python files for PEP8 violations, missing type hints, unsafe async patterns, and common runtime mistakes before merging.

Who is it for?

Teams merging Python services who want consistent PEP8, typing, and async audits without manually rereading style guides each review.

Skip if: Non-Python codebases or projects where automated linters like Ruff and mypy already gate CI with no need for agent-guided review.

When should I use this skill?

A developer asks to review .py files, check type hints, audit async/await usage, or evaluate Python exception handling before merge.

What you get

A categorized review report referencing PEP8, type-safety, async-patterns, and error-handling findings across reviewed .py files.

  • Categorized review findings
  • PEP8 and typing issue list
  • Async and exception-handling notes

By the numbers

  • Bundles 4 reference guides: pep8-style, type-safety, async-patterns, and error-handling
  • Maps 4 issue-type categories in its quick-reference review table

Files

SKILL.mdMarkdownGitHub ↗

Python Code Review

Quick Reference

Issue TypeReference
Indentation, line length, whitespace, namingreferences/pep8-style.md
Missing/wrong type hints, Any usagereferences/type-safety.md
Blocking calls in async, missing awaitreferences/async-patterns.md
Bare except, missing context, loggingreferences/error-handling.md
Mutable defaults, print statementsreferences/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
  • [ ] Naming: snake_case for functions/variables, CamelCase for classes, UPPER_CASE for constants
  • [ ] Inline comments separated by at least two spaces

Type Safety

  • [ ] Type hints on all function parameters and return types
  • [ ] No Any unless necessary (with comment explaining why)
  • [ ] Proper T | None syntax (Python 3.10+)

Async Patterns

  • [ ] No blocking calls (time.sleep, requests) in async functions
  • [ ] Proper await on all coroutines

Error Handling

  • [ ] No bare except: clauses
  • [ ] Specific exception types with context
  • [ ] raise ... from to preserve stack traces

Common Mistakes

  • [ ] No mutable default arguments
  • [ ] Using logger not print() for output
  • [ ] f-strings preferred over .format() or %

Valid Patterns (Do NOT Flag)

These patterns are intentional and correct - do not report as issues:

  • Type annotation vs type assertion - Annotations declare types but are not runtime assertions; don't confuse with missing validation
  • Using `Any` when interacting with untyped libraries - Required when external libraries lack type stubs
  • Empty `__init__.py` files - Valid for package structure, no code required
  • `noqa` comments - Valid when linter rule doesn't apply to specific case
  • Using `cast()` after runtime type check - Correct pattern to inform type checker of narrowed type

Context-Sensitive Rules

Only flag these issues when the specific conditions apply:

IssueFlag ONLY IF
Generic exception handlingSpecific exception types are available and meaningful
Unused variablesVariable lacks _ prefix AND isn't used in f-strings, logging, or debugging

Gates (reporting workflow)

Complete in order. Do not advance until each pass condition is met.

1. ScopePass: You list every .py path (or explicit glob) you inspected this run. 2. False-positive screenPass: For each issue you plan to report, you checked Valid Patterns and Context-Sensitive Rules above; you drop or narrow the finding if those sections say not to flag it. 3. EvidencePass: Each remaining finding includes `[FILE:LINE]` (or a bounded line range). Symbols or short verbatim snippets may supplement the location anchor but do not replace it. 4. Verification protocolPass: You load review-verification-protocol and complete its mandatory steps for each reported issue before the user-facing write-up. 5. ShipPass: The user-visible output matches whatever structure that protocol requires (no issues-only dump that skips its checks).

When to Load References

  • Reviewing code formatting/style → pep8-style.md
  • Reviewing function signatures → type-safety.md
  • Reviewing async def functions → async-patterns.md
  • Reviewing try/except blocks → error-handling.md
  • General Python review → common-mistakes.md

Review Questions

1. Does the code follow PEP8 formatting (indentation, line length, whitespace)? 2. Are imports properly grouped (stdlib → third-party → local)? 3. Do names follow conventions (snake_case, CamelCase, UPPER_CASE)? 4. Are all function signatures fully typed? 5. Are async functions truly non-blocking? 6. Do exceptions include meaningful context? 7. Are there any mutable default arguments?

Before reporting: complete Gates (reporting workflow) above (especially gate 4).

Related skills

How it compares

Use python-code-review for agent-guided qualitative audits; pair with Ruff or mypy in CI when you need enforced automated gates.

FAQ

What issue types does python-code-review cover?

python-code-review covers PEP8 style, type-safety including Any misuse, async patterns such as blocking calls and missing await, and error-handling problems like bare except clauses.

How is python-code-review organized?

python-code-review uses a quick-reference table linking issue types to four markdown references—pep8-style, type-safety, async-patterns, and error-handling—for consistent reviews.

Is Python Code Review safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Code Review & Qualitytestingintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.