python

Enforce Python best practices including type hints, formatting, and error handling.

3|1|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/cardoso-neto/personal-ai-infra --skill python-cardoso-neto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/cardoso-neto/personal-ai-infra/tree/main/skills/python
Command: npx skills add https://github.com/cardoso-neto/personal-ai-infra --skill python-cardoso-neto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Python coding skill enforces best-practice guidelines to improve readability, reliability, and maintainability of Python code written or edited by the user.

Core Features & Use Cases

  • Enforces type hints and modern Python idioms to reduce runtime errors.
  • Encourages consistent formatting and linting, aiding collaboration and onboarding.
  • Applies across small scripts and larger libraries to maintain code quality over time.

Quick Start

Refactor the provided Python snippet to improve readability, type hints, and error handling.

Frequently Asked Questions about python

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

FAQPage Schema
How do I enforce Python type hints and best practices in my code?

To enforce Python type hints and best practices, apply this Skill to refactor your snippets with modern idioms, consistent formatting like isort and black, and strict typing to align with static type checking and reduce runtime errors.

What is the best way to refactor Python scripts for readability and maintainability?

The best way to refactor Python scripts for readability is to apply best-practice guidelines, add type hints, enforce consistent formatting, and replace broad exception handling with robust error management to improve long-term code quality.

Does this Python coding skill work for both small scripts and modular libraries?

Yes, this Python coding skill works across coding tasks from small scripts to modular libraries, enforcing style guides, type hints, and robust error handling to maintain code quality over time regardless of project scale.

Why should I avoid broad exception handling in Python?

You should avoid broad exception handling in Python because it masks specific runtime errors; this Skill enforces robust, targeted error handling alongside static type checking to ensure reliability and maintainability.

Can I use isort and black formatting rules with this Python refactoring approach?

Yes, you can use isort and black formatting rules because this Python approach requires consistent formatting and applies static analysis to enforce style guides, aiding collaboration and onboarding across your coding tasks.