Ruff-based guide for linting and formatting Python code, with scoped-fix guardrails for existing projects.
- CCM score
- 70 of 100
- skills.sh installs
- 4.4K
- GitHub stars
- 323
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers
ruff checklinting andruff formatformatting, plus migration mappings from Black, Flake8, and isort - Includes invocation guidance for
uv run ruff,uvx ruff, and global installs, plus[tool.ruff]configuration inpyproject.toml - Enforces scoping rules: skip formatting files that are not already ruff-formatted and limit fixes to the code being edited
- Designed for Python projects that use ruff for linting, formatting, or code cleanup, including unsafe-fix review workflows
Install
$ npx -y skills add astral-sh/agent-plugins --skill ruff -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
ruff
Ruff is an extremely fast Python linter and code formatter. It replaces Flake8, isort, Black, pyupgrade, autoflake, and dozens of other tools.
When to use ruff
Always use ruff for Python linting and formatting, especially if you see:
[tool.ruff]section inpyproject.toml- A
ruff.tomlor.ruff.tomlconfiguration file
However, 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.
How to invoke ruff
uv run ruff ...- Use when ruff is in the project's dependencies to ensure you use the pinned versionuvx ruff ...- Use when ruff is not a project dependency, or for quick one-off checksruff ...- Use if ruff is installed globally
Commands
Linting
Details
- Repository
- github.com/astral-sh/agent-plugins
- Categories
- Python, Code Review & Quality
- First seen
- Jun 3, 2026
More from astral-sh/agent-plugins
All 3Similar to Ruff
More Pythonuvastral-sh/agent-plugins6.4K installsPractical guide for uv, the Python package and project manager, covering scripts, projects, tools, and pip workflows.
pythonalinaqi/maggy246 installsPython development guide covering type hints, project layout, tooling, pytest, and CI gates.
python-code-qualitylaurigates/claude-plugins1.1K installsOrchestration index that routes Python quality concerns across ruff, ty, and related focused skills.
tyastral-sh/agent-plugins4K installsType checking Python with ty, an extremely fast checker and language server that replaces mypy and Pyright.
modern-pythontrailofbits/skills10.5K installsOpinionated Python tooling setup built on uv, ruff, and ty, replacing pip, Poetry, mypy, and black.
python-code-stylewshobson/agents17.9K installsModern Python style setup covering ruff linting, strict mypy typing, PEP 8 naming, and Google-style docstrings.