python-excellence

Enforce principal-engineer Python standards for typing, formatting, and anti-pattern elimination.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/ParamChordiya/ai-skills-library --skill python-excellence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-excellence
Source: https://github.com/ParamChordiya/ai-skills-library/tree/main/python-excellence
Command: npx skills add https://github.com/ParamChordiya/ai-skills-library --skill python-excellence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates inconsistent, low-quality Python output by enforcing a principal-engineer standard for typing, formatting, design, and safety.

Core Features & Use Cases

  • Type Safety: Requires full annotations, modern union syntax, built-in generics, Protocols, and careful use of Any.
  • Pythonic Design: Promotes dataclasses, context managers, pathlib, comprehensions, keyword-only arguments, and clean class and function boundaries.
  • Anti-Pattern Prevention: Rejects mutable defaults, bare excepts, eval and exec, assert-based validation, shadowed built-ins, and unsafe type checks.
  • Use Case: Review or generate a Python module, then rewrite it so it is black-formatted, ruff-clean, idiomatic, and production-safe.

Quick Start

Use the python-excellence skill to rewrite the attached Python file so it follows the skill's typing, formatting, design, and anti-pattern rules.

Frequently Asked Questions about python-excellence

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

FAQPage Schema
How do I enforce consistent Python code formatting and typing standards across my project?

To enforce Python code formatting and typing, you need full type annotations, black and isort formatting, and ruff-clean output. This ensures consistent design, safe resource handling, and eliminates unsafe constructs like mutable defaults and bare excepts.

What is the best way to review Python code for anti-patterns and unsafe constructs?

The best way to review Python code for anti-patterns is to reject mutable defaults, bare excepts, eval, exec, and assert-based validation. Enforcing principal-engineer standards eliminates shadowed built-ins and unsafe type checks for production-safe modules.

How do I make my Python functions and classes more idiomatic and production-safe?

To make Python functions and classes idiomatic, use dataclasses, context managers, pathlib, and keyword-only arguments. Production-safe code requires explicit public APIs, careful use of Any, and modern union syntax with built-in generics and Protocols.

Does this Python code review approach work with Jupyter notebooks and project configuration?

Yes, this principal-engineer Python standard applies to source files, notebooks, and project configuration. It enforces typing, formatting, and async patterns across all code generation and review scenarios for consistent, idiomatic output.

Why should I avoid mutable defaults and bare excepts in Python?

You should avoid mutable defaults and bare excepts because they are unsafe anti-patterns. Rejecting them, along with eval, exec, and assert-based validation, ensures safe resource handling and creates robust, production-safe Python code.