lsp-fix
Turn strict LSP diagnostics into server-backed code-action proposals without mutating files.
SKILL.mdskills/lsp-fix/SKILL.md
GitHublsp-fix
From diagnostic to validated proposal, with SmartEdit owning the write.
WHEN
- A compiler or language-server diagnostic identifies a failing range.
- You want quick fixes grounded in the server's current document state.
WHEN NOT
- There is no diagnostic. Use
lsp-exploreorgrepfirst. - You need a non-diagnostic refactor. Use
lsp-safe-refactor. - You are checking an already-applied fix. Use
lsp-verify.
Workflow
diagnosticsfor the file.- Choose the exact diagnostic range.
- Optionally
hoverat the range start for type context. codeActionsfor that range, passing diagnostic context when useful.- Return the selected action/proposal. SmartEdit applies it.
Guardrails
- Do not silently broaden the diagnostic range.
- Check strict envelope status and freshness.
- Code actions are proposals; SmartRead does not apply them.
- Positions and ranges are 0-based in negotiated encoding.
EXAMPLE
{"operation":"diagnostics","path":"src/auth.ts"}
Budgets
Diagnostics plus one code-action request is the default; add hover only when it resolves ambiguity.