ruff
ruff combines linting, formatting, and dependency analysis into a single Rust-based tool for Python projects. It replaces multiple tools like Flake8, Black, and isort while offering a built-in language server, configurable rule selection, and both safe and unsafe fix modes. Configure via ruff.toml or pyproject.toml to control which rules run, how code formats, and which violations auto-fix.
ruff is a Rust-based Python linter, formatter, and analyzer that replaces Flake8, Black, and isort in a single tool.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-23
ruff is a Rust-based Python linter, formatter, and analyzer that replaces Flake8, Black, and isort in a single tool. ruff combines linting, formatting, and dependency analysis into a single Rust-based tool for Python projects. It replaces multiple tools like Flake8, Black, and isort while offering a built-in language server, configurable rule selection, and both safe and unsafe fix modes. Configure via ruff.toml or pyproject.toml to control which rules run, how code formats, and which violations auto-fix.
Use it when
- Yes—ruff is designed as a unified replacement for Flake8, Black, and isort.
- ruff categorizes auto-fixes into safe and unsafe modes.
Verify before relying
Read SKILL.md below before installing (3 files). Open directory: indexed for reading, not audited.
Install
hyperb1iss/hyperskills/ruff · repository language: Makefile
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I lint Python code with ruff?
ruff provides linting through its `ruff check` command, which analyzes your Python files against hundreds of rules across multiple rule sets (Flake8, isort, Black compatibility, and more). Run `ruff check .` to scan your project, or `ruff check path/to/file.py` for a specific file. ruff reports violations with rule codes (e.g., E501 for line length) and their locations. You can configure which rules run via ruff.toml or pyproject.toml using `select` and `extend-select` to enable rule families, and `ignore` to suppress unwanted checks.
Can ruff replace Flake8, Black, and isort in my workflow?
Yes—ruff is designed as a unified replacement for Flake8, Black, and isort. Use `ruff check` for linting (replacing Flake8), `ruff format` for code formatting (replacing Black), and ruff's isort-compatible rules for import sorting. This consolidation eliminates tool conflicts, reduces configuration overhead, and speeds up CI/CD since ruff is written in Rust and runs much faster. Migrate by updating your pyproject.toml or ruff.toml with equivalent rule selections and formatting preferences, then run `ruff check --fix` and `ruff format` instead of invoking three separate tools.
What's the difference between ruff safe fixes and unsafe fixes?
ruff categorizes auto-fixes into safe and unsafe modes. Safe fixes are applied by default with `ruff check --fix` and preserve code semantics—ruff is certain the change won't alter behavior. Unsafe fixes may change logic or require human review; enable them with `--unsafe-fixes` flag. For example, removing an unused import is safe, but simplifying a complex expression might be unsafe. Check the rule documentation to see which fixes fall into each category. Use `--show-fixes` to preview what ruff will change before applying fixes.
How do I configure ruff rules in pyproject.toml?
ruff configuration lives in a `[tool.ruff]` section in pyproject.toml (or in a dedicated ruff.toml file). Use `select` to enable specific rule codes or families (e.g., `select = ["E", "F", "I"]` for errors, Pyflakes, and isort), `extend-select` to add rules to defaults, and `ignore` to suppress rules. Set `line-length` for formatting, `target-version` for Python compatibility, and `per-file-ignores` for file-specific exceptions. Example: `[tool.ruff]` with `line-length = 100`, `select = ["E501", "F"]`, and `per-file-ignores = {"__init__.py" = ["F401"]}` to ignore unused imports in init files.
How do I suppress specific linting violations with ruff?
ruff supports `noqa` comments to suppress violations inline. Add `# noqa` at the end of a line to ignore all violations on that line, or `# noqa: E501` to suppress only rule E501. Use `# noqa: E501, F401` for multiple rules. For entire files, add `# ruff: noqa` at the top. You can also configure per-file ignores in pyproject.toml under `per-file-ignores` (e.g., `{"tests/*" = ["F841"]}` to ignore unused variables in test files). ruff respects these comments during both `ruff check` and `ruff format` operations.
What is ruff server and how do I use it for IDE integration?
ruff server is a language server protocol (LSP) implementation that integrates ruff into IDEs like VS Code, PyCharm, and Neovim for real-time linting and formatting feedback. Start it with `ruff server` and configure your editor to connect to it. The server provides on-the-fly diagnostics, code actions (quick fixes), and formatting on save. This gives you instant feedback without running separate CLI commands. Install the Pylance or ruff-lsp extension in your IDE, point it to the ruff server, and you'll see violations highlighted inline with suggestions to auto-fix them.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
ruff: Python Linter & Formatter
ruff (v0.15.12, Apr 2026) is three tools in one Rust binary: linter (ruff check), formatter (ruff format), and dependency analyzer (ruff analyze graph). It replaces Flake8, Black, isort, pyupgrade, and dozens more.
The built-in language server (ruff server) replaces the deprecated ruff-lsp package (archived Dec 2025).
Invocation
uv run ruff ... # Project dependency (pinned version)
uvx ruff ... # One-off (latest)
ruff ... # Global install
Rule Selection: The Critical Decision
Default rules are minimal: only ["E4", "E7", "E9", "F"], catches syntax errors and undefined names but misses most quality rules. You almost certainly need to extend this.
select vs extend-select
|
(truncated - see the full file via the links below)
File tree — 3 files
skills/ruff/SKILL.md
skills/ruff/references/configuration.md
skills/ruff/references/rules.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Configure and run ruff for Python linting, formatting, and code quality”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Ruff is a high-performance Python linter written in Rust that consolidates multiple tools into one. It delivers 10-100x speed improvements over traditional linters while supporting 800+ rules and auto-fix capabilities, making it ideal for enforcing consistent code standards across teams and CI pipelines.
Ruff is an exceptionally fast Python linter and formatter that consolidates the functionality of Flake8, Black, isort, pyupgrade, and autoflake into a single tool. It detects code violations and applies automatic fixes, with options to scope changes to specific files or review unsafe fixes before applying them.
Execute ruff-based code quality checks and formatting across Python projects. This skill covers running linting scans, applying safe auto-fixes, and formatting code to match project standards—plus interpreting common violation codes and configuring ruff rules in pyproject.toml.
Automate code style enforcement by installing and configuring formatters and linters tailored to your stack. The skill detects your language, selects appropriate tools, generates configuration files, and integrates git hooks and CI workflows to maintain consistency across your team.
Code Linting runs unified checks across Python and JavaScript/TypeScript projects using ruff and Biome. It detects violations, applies safe auto-fixes for formatting and imports, and guides manual resolution of remaining issues.
This skill enables you to create and run Behat behavior-driven development tests using Gherkin syntax, making it straightforward to validate PHP web application behavior through readable, executable specifications. Leverage structured scenario definitions to bridge the gap between business requirements and automated test coverage.