code-quality-tools

Configure Ruff, MyPy, and pre-commit for scientific Python projects.

25|10|Updated Nov 6, 2025
One-click install
npx skills add https://github.com/uw-ssec/rse-plugins --skill code-quality-tools
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality-tools
Source: https://github.com/uw-ssec/rse-plugins/tree/main/plugins/scientific-python-development/skills/code-quality-tools
Command: npx skills add https://github.com/uw-ssec/rse-plugins --skill code-quality-tools

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

This skill provides a standardized approach to establishing and enforcing code quality in scientific Python projects by combining fast linting, static type checking, and automated quality gates.

Core Features & Use Cases

  • Ruff for linting and formatting to keep code consistent and clean.
  • MyPy for static type checking to catch type errors early.
  • Pre-commit hooks to automatically run checks before commits and CI.
  • Configurations and starter templates for pyproject.toml and CI workflows to accelerate adoption.
  • Use cases include kicking off new scientific Python projects, refactoring large codebases, and ensuring reproducible quality gates in CI.

Quick Start

Install ruff, mypy, and pre-commit in your environment, then enable and run pre-commit on your codebase.

Frequently Asked Questions about code-quality-tools

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

FAQPage Schema
How do I configure pre-commit hooks for Ruff and MyPy in a Python project?

Pre-commit hooks for Ruff and MyPy are configured using pyproject.toml starter templates that establish automated quality gates, ensuring deterministic linting and type checking run before commits and within CI pipelines.

What is the best way to enforce code quality in a scientific Python project?

The best way to enforce code quality in scientific Python projects is by combining Ruff for fast linting, MyPy for static type checking, and pre-commit hooks to apply automated quality gates consistently across local environments and CI.

How do I set up Ruff and MyPy for static type checking and linting?

You set up Ruff and MyPy by installing them in your environment and applying provided pyproject.toml configurations, which standardizes linting and static type checking to catch errors early and maintain clean code.

Can I use pre-commit hooks to run quality gates in CI pipelines?

Yes, you can use pre-commit hooks to run deterministic quality gates in CI pipelines, applying Ruff and MyPy checks consistently to ensure reproducible code quality across both local development and automated workflows.

Does this code quality configuration work for refactoring large legacy Python codebases?

Yes, this configuration supports refactoring large legacy Python codebases by applying deterministic Ruff and MyPy checks, allowing you to enforce consistent code quality and catch type errors during structural improvements.

Why use Ruff for linting instead of other tools in a scientific Python environment?

Ruff is used for linting and formatting in scientific Python environments to achieve fast and reliable code quality, providing a standardized approach to keeping codebases consistent and clean without slow execution times.