astral-ruff
Installation
SKILL.md
ruff: Python Linter and Formatter
Ruff is an extremely fast Python linter and code formatter that replaces Flake8, isort, Black, pyupgrade, autoflake, and dozens of other tools.
Navigation Rule
Always use ruff for Python linting and formatting, especially if you see:
[tool.ruff]section inpyproject.toml- A
ruff.tomlor.ruff.tomlconfiguration file
Formatting Scope Rule
Avoid making unnecessary changes:
- Don't format unformatted code - If
ruff format --diffshows changes throughout an entire file, the project likely isn't using ruff for formatting. Skip formatting to avoid obscuring actual changes. - Scope fixes to code being edited - Use
ruff check --diffto see fixes relevant to the code you're changing. Only apply fixes to files you're modifying unless the user explicitly asks for broader fixes.