/code-quality-refactoring:ruff-recursive-fixfrom code-quality-refactoring
Runs Ruff linting and formatting in an iterative loop, applying safe then unsafe autofixes, reviewing diffs, and resolving remaining findings with targeted edits or user decisions.
Ships in code-quality-refactoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run Ruff linting and formatting in a scoped iterative loop that applies safe fixes first, optionally applies unsafe fixes, reviews diffs, manually remediates remaining findings, and reports any justified suppressions or unresolved decisions.
Use this skill to enforce code quality with Ruff in a controlled, iterative workflow. It supports:
pyproject.toml.uv, direct ruff, python -m ruff, or equivalent).--select, --ignore, --extend-select, --extend-ignore).# noqa only when suppression is justified.Collect these inputs before running:
target_path (optional): folder or file to check. Empty means whole repository.ruff_runner (optional): explicit Ruff command prefix (for example uv run, ruff, python -m ruff, pipx run ruff).rules_select (optional): comma-separated rule codes to enforce.rules_ignore (optional): comma-separated rule codes to ignore.extend_select (optional): extra rules to add without replacing configured defaults.extend_ignore (optional): extra ignored rules without replacing configured defaults.allow_unsafe_fixes (default: true): whether to run Ruff unsafe fixes.ask_on_ambiguity (default: true): always ask the user when multiple valid choices exist.Build Ruff commands from inputs.
Determine a reusable ruff_cmd prefix before building commands.
Resolution order:
ruff_runner is provided, use it as-is.uv is available and Ruff is managed through uv, use uv run ruff.ruff is available on PATH, use ruff.python -m ruff.pipx run ruff), or stop and ask the user.Use the same resolved ruff_cmd for all check and format commands in the workflow.
Base command:
<ruff_cmd> check
Formatter command:
<ruff_cmd> format
With optional target:
<ruff_cmd> format <target_path>
Add optional target:
<ruff_cmd> check <target_path>
Add optional overrides as needed:
--select <codes>
--ignore <codes>
--extend-select <codes>
--extend-ignore <codes>
Examples:
# Full project with defaults from pyproject.toml
ruff check
# One folder with defaults
python -m ruff check src/models
# Override to skip docs and TODO-like rules for this run
uv run ruff check src --extend-ignore D,TD
# Check only selected rules in a folder
ruff check src/data --select F,E9,I
<ruff_cmd> check with the selected scope and options.--fix using the same scope/options.<ruff_cmd> format on the same scope.<ruff_cmd> check to refresh remaining findings.Run only if findings remain and allow_unsafe_fixes=true.
--fix --unsafe-fixes using the same scope/options.<ruff_cmd> format on the same scope.<ruff_cmd> check.For remaining findings:
<ruff_cmd> format on the same scope.<ruff_cmd> check.If there are multiple valid solutions at any step, always ask the user before proceeding. Do not choose silently between equivalent options.
# noqa)Use suppression only when all conditions are true:
Guidelines:
# noqa: <RULE> over broad # noqa.Repeat steps 2 to 6 until one of these outcomes:
<ruff_cmd> check returns clean.Each loop iteration must include <ruff_cmd> format before the next <ruff_cmd> check.
When no progress is detected:
Before declaring completion:
At the end of execution, report:
## Ruff recursive fix result
**Status:** clean | fixed | blocked | needs decision
**Scope:** `{{target_path_or_repository}}`
**Ruff command:** `{{ruff_cmd}} check {{options}}`
**Iterations:** {{count}}
| Category | Result |
| --- | --- |
| Safe autofixes | {{count_or_none}} |
| Unsafe autofixes | {{count_or_skipped}} |
| Manual fixes | {{files_or_none}} |
| Suppressions | {{rule_and_rationale_or_none}} |
| Remaining findings | {{findings_or_none}} |
### Validation
- `{{ruff_cmd}} format {{target_path}}`: pass | fail
- `{{ruff_cmd}} check {{target_path}} {{options}}`: pass | fail
ruff_cmd prefix is used for every check and format command.allow_unsafe_fixes=false and highlighted when applied.# noqa suppression is narrow, rule-specific where possible, and justified.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin code-quality-refactoring9 skills in this plugin
/dotnet-design-pattern-reviewReview C# and .NET code for design pattern quality, SOLID principles, dependency injection, repository/provider abstractions, ResourceManager usage, async practices, testability, and maintainability. Use this skill when asked for a .NET or C# design pattern review, architecture critique, or pattern-focused code review without modifying code./editorconfigGenerate or update a comprehensive .editorconfig from repository file types and formatting preferences, including indentation, line endings, charset, whitespace, final newline, language globs, and rule-by-rule explanations. Use when asked to create, standardize, or explain EditorConfig./em-dashOther plugins' skills for the same job