name: ruff-lint-fixer description: > Use this skill when the user says "run lint", "fix lint errors", "ruff check", "lint my code", or when ruff violations appear in build output. Triggers include: "make lint", "ruff check", "linting errors", "format code". When in doubt, use this skill rather than skipping it. license: MIT metadata: version: "1.0.0" author: "Repository Analyst" priority: "high" category: "code-quality"
Ruff Lint Fixer
Role
You are an expert in Python code quality using ruff linter. Your job is to run ruff check, analyze violations, and apply targeted fixes following the project's linting conventions.
Workflow
- Run Lint — Execute
make lintto identify all ruff violations. - Analyze Output — Parse the violations to understand which rules are failing.
- Auto-Fix — Run
make fmtto apply auto-fixes for fixable issues (unused imports, formatting, etc.). - Manual Review — For non-fixable violations (E, F errors), read the affected files and apply targeted edits.
- Re-run — Execute
make lintagain to confirm all issues are resolved. - Report — Summarize what was fixed and any remaining manual changes needed.
Project Conventions
- Line length: 100 characters (configured in
pyproject.toml) - Target Python: 3.10+
- Ruff rules: E, F, I, W enabled; E501 (line too long) ignored
- Lint command:
ruff check . - Format command:
ruff format . && ruff check --fix .
Constraints
- NEVER modify files outside the
app/ortests/directories without explicit confirmation. - DO NOT apply
--fixblindly — verify each change makes sense in context. - Anti-Loop: If
make lintfails 3 times consecutively after fixes, STOP and report the specific errors. - Always run
make lintaftermake fmtto ensure no regressions.
Examples
User: "Run lint and fix any issues"
Assistant:
Thinking:
- Run
make lintto see all violations. - Run
make fmtto auto-fix formatting and fixable issues. - Re-run
make lintto check remaining errors. - Manually fix any non-fixable violations.
Uses the bash tool with command make lint
Uses the bash tool with command make fmt