code-quality

Configure Ruff and mypy for Python code quality and type checking.

28|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/oborchers/fractional-cto --skill code-quality-oborchers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality
Source: https://github.com/oborchers/fractional-cto/tree/main/python-package/skills/code-quality
Command: npx skills add https://github.com/oborchers/fractional-cto --skill code-quality-oborchers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity and fragmentation of Python code quality tooling by consolidating linters, formatters, and type checkers into a streamlined, efficient workflow. It eliminates the need to manage multiple tools and configurations, ensuring consistent code standards and robust type safety.

Core Features & Use Cases

  • Unified Tooling: Integrates Ruff for linting and formatting, and mypy/pyright for type checking.
  • Opinionated Defaults: Provides recommended configurations for Ruff rule sets, formatting, and strict type checking.
  • Modern Type Hinting: Guides on using the latest Python type hinting syntax and best practices.
  • Pre-commit Optimization: Streamlines pre-commit hooks to include only essential Ruff checks.
  • Use Case: When setting up a new Python project, use this Skill to configure Ruff and mypy, ensuring code adheres to best practices and type safety from the start.

Quick Start

Configure Ruff and mypy for a new Python project by following the recommended settings in pyproject.toml.

Frequently Asked Questions about code-quality

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

FAQPage Schema
How do I configure Ruff and mypy for Python code quality and type checking?

Configure Ruff and mypy for Python code quality by establishing a unified standard in pyproject.toml, covering linters, formatters, and strict type checking modes. This eliminates tool fragmentation and ensures type safety.

What is the best way to set up Python pre-commit hooks for formatting and linting?

Streamline Python pre-commit hooks by including only essential Ruff checks for formatting and linting. This optimizes the workflow by consolidating multiple code quality tools into a single, efficient pre-commit execution.

How do I use modern Python type annotations with mypy and pyright?

Use modern Python type annotation syntax by applying best practices like TYPE_CHECKING guards and py.typed markers. This ensures mypy and pyright correctly interpret strict type checking modes without runtime overhead.

Does Ruff replace standard Python linters and formatters for code quality?

Ruff replaces standard Python linters and formatters by consolidating linting and formatting into one tool. It eliminates the need to manage multiple code quality tools, providing opinionated defaults for rule sets and formatting.

Why use py.typed markers and TYPE_CHECKING guards in a Python project?

Use py.typed markers and TYPE_CHECKING guards to declare type information explicitly and avoid runtime circular imports. This approach ensures type safety and allows type checkers like mypy to validate the project correctly.