github/awesome-copilot/skills/ruff-recursive-fix/SKILL.md
ruff-recursive-fix
Run Ruff checks with optional scope and rule overrides, apply safe and unsafe autofixes iteratively, review each change, and resolve remaining findings with targeted edits or user decisions.
- Source repository stars
- 37,126
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-07-28
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
Run Ruff checks with optional scope and rule overrides, apply safe and unsafe autofixes iteratively, review each change, and resolve remaining findings with targeted edits or user decisions.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/github/awesome-copilot --skill "skills/ruff-recursive-fix"Inspect the Agent Skill "ruff-recursive-fix" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/ruff-recursive-fix/SKILL.md at commit 9933dcad5be5caeb288cebcd370eeeb2fc2f1685. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow
1. Run check with the selected scope and options. 2. Classify findings by type: - Autofixable safe. - Autofixable unsafe. - Not autofixable. 3. If no findings remain, stop.
Run check with the selected scope and options.Classify findings by type:Autofixable safe. - 02
Inputs
Collect these inputs before running:
targetpath (optional): folder or file to check. Empty means whole repository.ruffrunner (optional): explicit Ruff command prefix (for example uv run, ruff, python -m ruff, pipx run ruff).rulesselect (optional): comma-separated rule codes to enforce. - 03
Command Construction
Build Ruff commands from inputs.
If ruffrunner is provided, use it as-is.Else if uv is available and Ruff is managed through uv, use uv run ruff.Else if ruff is available on PATH, use ruff. - 04
0. Resolve Ruff Runner
Determine a reusable ruffcmd prefix before building commands.
If ruffrunner is provided, use it as-is.Else if uv is available and Ruff is managed through uv, use uv run ruff.Else if ruff is available on PATH, use ruff. - 05
Full project with defaults from pyproject.toml
Review the “Full project with defaults from pyproject.toml” section in the pinned source before continuing.
Review and apply the “Full project with defaults from pyproject.toml” source section.
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
python -m ruff check src/modelsEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 87/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 37,126 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- github/awesome-copilot
- Skill path
- skills/ruff-recursive-fix/SKILL.md
- Commit
- 9933dcad5be5caeb288cebcd370eeeb2fc2f1685
- License
- MIT
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
Ruff Recursive Fix
Overview
Use this skill to enforce code quality with Ruff in a controlled, iterative workflow. It supports:
- Optional scope limitation to a specific folder.
- Default project settings from
pyproject.toml. - Flexible Ruff invocation (
uv, directruff,python -m ruff, or equivalent). - Optional per-run rule overrides (
--select,--ignore,--extend-select,--extend-ignore). - Automatic safe then unsafe autofixes.
- Diff review after each fix pass.
- Recursive repetition until findings are resolved or require a decision.
- Judicious use of inline
# noqaonly when suppression is justified.
Inputs
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 exampleuv 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.
Command Construction
Build Ruff commands from inputs.
0. Resolve Ruff Runner
Determine a reusable ruff_cmd prefix before building commands.
Resolution order:
- If
ruff_runneris provided, use it as-is. - Else if
uvis available and Ruff is managed throughuv, useuv run ruff. - Else if
ruffis available onPATH, useruff. - Else if Python is available and Ruff is installed in that environment, use
python -m ruff. - Else use any project-specific equivalent that invokes installed Ruff (for example
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
Workflow
1. Baseline Analysis
- Run
<ruff_cmd> checkwith the selected scope and options. - Classify findings by type:
- Autofixable safe.
- Autofixable unsafe.
- Not autofixable.
- If no findings remain, stop.
2. Safe Autofix Pass
- Run Ruff with
--fixusing the same scope/options. - Review resulting diff carefully for semantic correctness and style consistency.
- Run
<ruff_cmd> formaton the same scope. - Re-run
<ruff_cmd> checkto refresh remaining findings.
3. Unsafe Autofix Pass
Run only if findings remain and allow_unsafe_fixes=true.
- Run Ruff with
--fix --unsafe-fixesusing the same scope/options. - Review resulting diff carefully, prioritizing behavior-sensitive edits.
- Run
<ruff_cmd> formaton the same scope. - Re-run
<ruff_cmd> check.
4. Manual Remediation Pass
For remaining findings:
- Fix directly in code when there is a clear, safe correction.
- Keep edits minimal and local.
- Run
<ruff_cmd> formaton the same scope. - Re-run
<ruff_cmd> check.
5. Ambiguity Policy
If there are multiple valid solutions at any step, always ask the user before proceeding. Do not choose silently between equivalent options.
6. Suppression Decision (# noqa)
Use suppression only when all conditions are true:
- The rule conflicts with required behavior, public API, framework conventions, or readability goals.
- Refactoring would be disproportionate to the value of the rule.
- The suppression is narrow and specific (single line, explicit code when possible).
Guidelines:
- Prefer
# noqa: <RULE>over broad# noqa. - Add a brief reason comment for non-obvious suppressions.
- If two or more valid outcomes exist, always ask the user which option to prefer.
7. Recursive Loop and Stop Criteria
Repeat steps 2 to 6 until one of these outcomes:
<ruff_cmd> checkreturns clean.- Remaining findings require architectural/product decisions.
- Remaining findings are intentionally suppressed with documented rationale.
- Repeated loop makes no progress.
Each loop iteration must include <ruff_cmd> format before the next <ruff_cmd> check.
When no progress is detected:
- Summarize blocked rules and affected files.
- Present valid options and trade-offs.
- Ask the user to choose.
Quality Gates
Before declaring completion:
- Ruff returns no unexpected findings for the chosen scope/options.
- All autofix diffs are reviewed for correctness.
- No suppression is added without explicit justification.
- Any unsafe fix with possible behavioral impact is highlighted to the user.
- Ruff formatting is executed in every iteration.
Output Contract
At the end of execution, report:
- Scope and Ruff options used.
- Number of iterations performed.
- Summary of fixed findings.
- List of manual fixes.
- List of suppressions with rationale.
- Remaining findings, if any, and required user decisions.
Suggested Prompt Starters
- "Run ruff-recursive-fix on the whole repo with default config."
- "Run ruff-recursive-fix only on src/models, ignore DOC rules."
- "Run ruff-recursive-fix on tests with select F,E9,I and no unsafe fixes."
- "Run ruff-recursive-fix on src/data and ask me before adding any noqa."
Alternatives
Compare before choosing
event4u-app/agent-config
design-review
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
K-Dense-AI/scientific-agent-skills
dask
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
neurokit2
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.
K-Dense-AI/scientific-agent-skills
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.