| name | lsp-fix-all |
| description | Apply available quick-fix code actions for all current diagnostics in a file, one at a time with re-collection between each fix. Use to bulk-resolve errors and warnings the language server can fix automatically. |
| argument-hint | [file-path] |
| user-invocable | true |
| allowed-tools | mcp__lsp__get_diagnostics mcp__lsp__suggest_fixes mcp__lsp__apply_edit mcp__lsp__open_document mcp__lsp__format_document |
| license | MIT |
| compatibility | Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp) |
| metadata | {"required-capabilities":"codeActionProvider","optional-capabilities":"documentFormattingProvider"} |
Requires the agent-lsp MCP server.
lsp-fix-all
Apply available quick-fix code actions for all current diagnostics in a file,
one at a time, re-collecting diagnostics between each fix because line numbers
shift after each application.
Important distinction from /lsp-safe-edit: This skill fixes pre-existing
diagnostics in a file — errors and warnings that already exist before any edit
session begins. /lsp-safe-edit has a code-action step (Step 7) for fixing errors
introduced by a specific edit you just made. Use this skill for systematic
bulk-fixing of existing issues, independent of any edit session.
When to use / not use
Use this skill when:
- A file has accumulated errors or warnings you want to resolve automatically
- You want to clean up a file before starting new work
- You want to apply all available language-server quick-fixes in bulk
Do NOT use this skill when:
- You just made an edit and want to fix newly introduced errors — use
/lsp-safe-edit
- You want to apply structural refactors — this skill applies quick-fixes only (see filtering below)
- The file has zero diagnostics (the skill will report clean and stop)
Input
- file_path: Absolute path to the file to fix.
Workflow
Step 1 — Open and collect initial diagnostics
Call mcp__lsp__open_document with the target file path to ensure it is loaded
in the language server. Then call mcp__lsp__get_diagnostics to retrieve all
current diagnostics.
If zero diagnostics are returned: report "No diagnostics found — file is clean."
and stop. No further steps are needed.
Record the initial count of errors and warnings for the summary output.
Step 2 — Classify and filter code actions
For EACH diagnostic (process one at a time, not in batch):
- Call
mcp__lsp__suggest_fixes at the diagnostic's position/range.
- Filter the returned actions to quick-fix kind only.
- Skip any diagnostic for which no applicable quick-fix exists — note it in the summary.
Decision gate — which code actions to apply: