python_best_practices

Run ruff, black, and mypy to lint, format, and type-check Python code.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/alangeb/tau --skill python-best-practices-alangeb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python_best_practices
Source: https://github.com/alangeb/tau/tree/main/src/skills/python_best_practices
Command: npx skills add https://github.com/alangeb/tau --skill python-best-practices-alangeb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ruff, black, mypy, and includes scripts (resource) components.

What problem does it solve?

This skill eliminates manual code quality maintenance by automating the execution of industry-standard Python tools to ensure consistent style and type safety.

Core Features & Use Cases

  • Automated Linting and Formatting: Runs ruff and black to fix style issues and enforce formatting standards automatically.
  • Type Checking: Integrates mypy to identify potential type errors in your codebase.
  • Use Case: Use this skill to instantly clean up a legacy Python script by running the full linting and formatting sequence to meet modern project standards.

Quick Start

Use the python_best_practices skill to lint and format the file located at path/to/script.py.

Frequently Asked Questions about python_best_practices

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

FAQPage Schema
How do I automate Python linting and formatting for a legacy script?

Automate Python linting and formatting by running ruff and black against the target file path. This sequence automatically fixes style issues and enforces modern formatting standards to clean up legacy code.

What is the best way to enforce type checking and code quality in Python?

Enforce Python type checking and code quality by integrating mypy, ruff, and black. This combination identifies potential type errors while maintaining consistent style across your codebase.

Do I need to install ruff, black, and mypy to use this automated code quality workflow?

Yes, this automated code quality workflow requires ruff, black, and mypy dependencies. These tools are integrated to execute the linting, formatting, and type checking sequences required for type-safe Python codebases.

How does automated type checking identify errors in a Python codebase?

Automated type checking identifies errors by running mypy to analyze Python code against defined type hints. This process detects potential type inconsistencies before runtime, ensuring clean and type-safe codebases.

Can I run both linting and formatting in a single automated Python workflow?

Yes, you can run both linting and formatting in a single automated Python workflow. The process executes ruff for linting and black for formatting sequentially to fix style issues and enforce standards automatically.

What are the limitations of using ruff and black for Python code style enforcement?

Ruff and black focus on automated style enforcement and formatting but do not replace logical testing. While ruff detects lint errors and black formats code, mypy must be run separately to validate type safety constraints.