ruff

Automate Python linting and formatting with Ruff auto-fixes.

5|3|Updated Jun 18, 2024
One-click install
npx skills add https://github.com/Unique-AG/ai --skill ruff-unique-ag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruff
Source: https://github.com/Unique-AG/ai/tree/main/.claude/skills/ruff
Command: npx skills add https://github.com/Unique-AG/ai --skill ruff-unique-ag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ruff automates Python linting and formatting by auto-fixing violations and enforcing a consistent code style in one command.

Core Features & Use Cases

  • Auto-fix lint violations automatically (F401, F403, etc.)
  • Enforce formatting with Ruff's Black-compatible formatter
  • Surface unfixable issues and guide configuration via pyproject.toml or Ruff config
  • Quick-start scaffolding: add Ruff to the project and run the cleanup in CI or pre-commit

Quick Start

Run the ruff tool to automatically fix lint violations and apply formatting across your project.

Frequently Asked Questions about ruff

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

FAQPage Schema
How do I automate Python linting and formatting in one command?

It enforces formatting using Ruff's Black-compatible formatter to apply consistent style, while also auto-fixing common lint violations like F401 and F403 across your Python codebase.

What do I need to configure before running Ruff for code quality checks?

You need Ruff installed and a Python project with an existing pyproject.toml or Ruff configuration file to guide the linting and formatting rules applied to your codebase.

Can I use Ruff to auto-fix import sorting and lint violations for large Python projects?

Yes, Ruff applies to both small standalone scripts and large Python projects, automatically fixing common lint issues and sorting imports across the entire codebase.

How does Ruff handle unfixable lint issues during automated formatting?

Ruff surfaces unfixable issues during the automated formatting process and guides configuration via pyproject.toml or Ruff config so you can address remaining violations manually.

What is the best way to add Ruff to a Python project for CI or pre-commit cleanup?

Use the quick-start scaffolding to add Ruff to your project and run the linting and formatting cleanup in CI or pre-commit pipelines to enforce code quality automatically.