megalinter-fixlisted
Install: claude install-skill ulises-jeremias/agent-toolkit
# MegaLinter fix
Fix the MegaLinter errors you were given (output contract of `megalinter-check`: linter keys, error counts, files, sample error lines).
## 1. Prepare
- If the current branch is the default branch (`main`/`master`), create a branch first: `git checkout -b megalinter/fix-<topic>`.
- Group the errors by linter key. Handle **blocking** linters (❌) first; mention non-blocking ones (⚠️) to the user but don't fix them unless asked.
## 2. Load the fix guides — lazily
For **each failing linter only**, read its fix guide from this skill's directory: `linters/<linter_key_lower>.md` (e.g. `linters/python_ruff.md`). The index is in `linters/README.md`.
Each guide contains a generated block (auto-fix support, config/ignore files, rule documentation URLs, tuning variables, known non-lint failure patterns) and researched fix instructions. Never load guides for linters without errors.
## 3. Fix
In this order:
1. **Auto-fixable linters** (guide says auto-fix supported): if a container engine is available, run `npx mega-linter-runner --linter <KEY> --fix [failing files...]` (add `--container-engine podman` when using podman; use `npx mega-linter-runner@beta` when `.mega-linter.yml` pins `MEGALINTER_VERSION: beta` — see the version rule in `megalinter-check`). Otherwise apply the underlying tool's documented fix behavior manually. If no engine is installed/running, ask the user first, then follow `container-engine.md` in the `megalinter-check` skill directory.
2. **Manu