python-code-standards

Standardize Ruff and Pyright configurations in pyproject.toml files.

2|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/grimlor/universal-dev-skills --skill python-code-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-code-standards
Source: https://github.com/grimlor/universal-dev-skills/tree/main/skills/python-code-standards
Command: npx skills add https://github.com/grimlor/universal-dev-skills --skill python-code-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents inconsistent Python code quality by standardizing how Ruff linting, Pyright type-checking, taskipy workflows, and pre-commit hooks are configured and applied.

Core Features & Use Cases

  • Unified quality gate: Provides a consistent “format → lint → type → test” workflow using ruff, pyright, pytest, and taskipy.
  • Tooling configuration standard: Establishes canonical pyproject.toml sections for Ruff, Pyright, and per-file lint rules for tests.
  • Docstring and rules discipline: Enforces pydocstyle requirements (D rules) while defining common ignore/override patterns.
  • Personal vs. team safety bar: Includes decision guidance to avoid overwriting team-owned tooling conventions in shared repositories.

Quick Start

Apply the standardized pyproject.toml configuration for Ruff and Pyright, then run format, lint, type, and tests using the provided taskipy task aliases.

Frequently Asked Questions about python-code-standards

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

FAQPage Schema
How do I configure Ruff and Pyright in pyproject.toml to enforce Python code quality?

To configure Ruff and Pyright in pyproject.toml, you define canonical sections for linting and type-checking. This standardizes Python tooling configurations to reduce code quality drift and establishes a consistent format, lint, type, and test workflow.

What is the best way to standardize Python linting and type-checking across multiple projects?

The best way to standardize Python linting and type-checking is by applying a unified pyproject.toml configuration. This establishes canonical settings for Ruff and Pyright, along with taskipy task aliases and pre-commit hooks, to prevent inconsistent code quality.

How do I set up pre-commit hooks with Ruff and Pyright for Python type checking?

You set up pre-commit hooks by defining their structure within your standardized pyproject.toml. This integrates Ruff linting and Pyright type-checking into your workflow, ensuring code quality is automatically validated before commits.

Can I use different Ruff lint rules for tests in my pyproject.toml?

Yes, you can use different Ruff lint rules for tests by defining per-file ignores in your pyproject.toml. This allows you to enforce pydocstyle requirements globally while applying common ignore or override patterns specifically for test files.

Does this Python tooling configuration overwrite existing team conventions in shared repositories?

No, it includes specific decision guidance to avoid overwriting team-owned tooling conventions in shared repositories. This helps you maintain a personal safety bar without disrupting established team configurations.

How do I run format, lint, type, and test workflows using taskipy in Python?

You run format, lint, type, and test workflows by applying the provided taskipy task aliases defined in your pyproject.toml. This creates a unified quality gate that sequences Ruff, Pyright, and pytest into a single automated command.