python-expert

Review Python code for correctness, type safety, performance, and PEP 8 style.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/vathymut/copilot-skills --skill python-expert-vathymut
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-expert
Source: https://github.com/vathymut/copilot-skills/tree/main/.github/skills/python-expert
Command: npx skills add https://github.com/vathymut/copilot-skills --skill python-expert-vathymut

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mypy, flake8, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers write and review Python code with a focus on correctness, type safety, performance, and style, making the codebase more reliable and maintainable.

Core Features & Use Cases

  • Correctness: Identifies and corrects common Python pitfalls like mutable default arguments and improper error handling.
  • Type Safety: Ensures proper use of type hints and dataclasses for better static analysis and code clarity.
  • Performance: Recommends list comprehensions, context managers, and built-in functions for efficiency.
  • Style: Enforces adherence to PEP 8 guidelines and includes comprehensive documentation for maintainability.

Quick Start

Review the Python code for correctness, type safety, performance, and style with the python-expert skill.

Frequently Asked Questions about python-expert

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

FAQPage Schema
How do I review Python code for type safety and PEP 8 style guidelines?

To review Python code for type safety and PEP 8 style guidelines, analyze the codebase using static analysis tools like mypy and flake8 to identify missing type hints, incorrect type usage, and style violations automatically.

Why does using mutable default arguments cause incorrect Python code behavior?

Using mutable default arguments causes incorrect Python code behavior because the default object is created once and shared across all function calls, leading to unexpected state retention and persistent data mutation between subsequent executions.

What is the best way to improve Python performance and type safety in an existing codebase?

The best way to improve Python performance and type safety is to implement list comprehensions, context managers, and built-in functions for efficiency, while adding dataclasses and type hints for better static analysis and code clarity.

Do I need mypy and flake8 to check Python code correctness and performance?

You need mypy and flake8 to effectively check Python code correctness and performance, as these linters provide the static analysis required to detect type errors, style guide violations, and improper error handling automatically.

Can I use this Python code review approach to identify inefficient loops and improper error handling?

Yes, you can use this Python code review approach to identify inefficient loops and improper error handling by systematically scanning for common pitfalls, recommending built-in functions, and enforcing proper exception management practices.