lsp-fix-all
Apply available quick-fix code actions for all current diagnostics in a file, one at a time with re-collection between each fix.
Skill by blackwell-systems
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/blackwell-systems-lsp-fix-all
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/lsp-fix-all
Tools it pre-approves 5
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
mcp__lsp__get_diagnosticsmcp__lsp__suggest_fixesmcp__lsp__apply_editmcp__lsp__open_documentmcp__lsp__format_document
What's inside
- Skill 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.
- License
- MIT
- Compatibility
- Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
- Allowed tools
- mcp__lsp__get_diagnostics, mcp__lsp__suggest_fixes, mcp__lsp__apply_edit, mcp__lsp__open_document, mcp__lsp__format_document
- Metadata
- optional-capabilities: documentFormattingProvider · required-capabilities: codeActionProvider
- Instructions
- 167 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- patterns.md · references/
SKILL.md (first lines)
> 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):
1. Call `mcp__lsp__suggest_fixes` at the diagnostic's position/range.
2. Filter the returned actions to quick-fix kind only.
3. Skip any diagnostic for which no applicable quick-fix exists — note it in the summary.
**Decision gate — which code actions to apply:**
| Action kind | Apply? |
|---|---|
| `quickfix` | YES |
| `quickfix.*` | YES |
| `refactor` | NO — structural change |
| `refactor.extract` | NO — structural change |
| `refactor.inline` | NO — structural change |
| `source.organizeImports` | YES — safe formatting |
| `source.*` (others) | NO — skip unless organizeImports |
| (no kind / empty) | NO — unknown, skip |
A code action qualifies if: `kind == "quickfix"`, OR `kind` starts with `"quickfix."`,
OR `kind == "source.organizeImports"`.
Reject actions whose kind is `"refactor"`, starts with `"refactor."`, or has no
kind field at all.
### Step 3 — Apply one fix and re-collect (the core loop)
This is the critical correctness constraint: **never apply more than one fix per
iteration.** After each `apply_edit` call, line numbers in the file shift. Always
re-call `get_diagnostics` before processing the next diagnostic.
**Loop:**
```
iteration = 0
max_iterations = 50
while iteration < max_iterations:
diagnostics = mcp__lsp__get_diagnostics(file_path)
if diagnostics is empty: break
for each diagnostic in diagnostics:
actions = mcp__lsp__suggest_fixes(diagnostic.range)
applicable = filter to quickfix / source.organizeImports kinds (see Step 2)
if applicable is not empty:
apply the first applicable action via mcp__lsp__apply_edit
record: (line, message, action title) in "Fixed" list
iteration += 1
break # restart the outer loop — line numbers have shifted
if no diagnostic in this pass had an applicable quick-fix:
break # no progress possible — exit loop
```
Exit the loop when:
- The diagnostics list is empty, OR
- No remaining diagnostic has an applicable quick-fix action, OR
- The iteration counter reaches 50 (safety guard against edge cases where a
fix introduces a new fixable diagnostic, preventing infinite loops)
If `apply_edit` returns an error: stop the loop immediately and report the
failure in the summary. Do not attempt further fixes.
### Step 4 — Verify and format
After the loop exits:
1. Call `mcp__lsp__get_diagnostics` one final time to capture the post-fix state.
2. For any remaining diagnostics that had no applicable quick-fix, list them in
the "Skipped" section with explanation.
3. Call `mcp__lsp__format_document` to clean up any indentation drift introduced
by the applied edits.From blackwell-systems/agent-lsp, MIT.
More from blackwell-systems/agent-lsp
- 0.791score
lsp-edit-export
blackwell-systems
Safe workflow for editing exported symbols or public APIs.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-understand
blackwell-systems
Deep-dive exploration of unfamiliar code — given a symbol or file, builds a complete Code Map showing type info, implementations, call hierarchy (2-level…
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-simulate
blackwell-systems
Speculative code editing session — simulate changes in memory before touching disk.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-rename
blackwell-systems
Two-phase safe rename across the entire workspace.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-impact
blackwell-systems
Blast-radius analysis for a symbol or file — shows all callers, type supertypes/subtypes, and reference count before you change it.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-dead-code
blackwell-systems
Enumerate exported symbols in a file and surface those with zero references across the workspace.
SkillAFreshness: A★ 164Claude Code +9 - 0.787score
lsp-safe-edit
blackwell-systems
Wrap any code edit with before/after diagnostic comparison.
SkillAFreshness: A★ 164Claude Code +9 - 0.787score
lsp-explore
blackwell-systems
"Tell me about this symbol": hover + implementations + call hierarchy + references in one pass — for navigating unfamiliar code.
SkillAFreshness: A★ 164Claude Code +9 - 0.787score
lsp-extract-function
blackwell-systems
Extract a selected code block into a named function.
SkillAFreshness: A★ 164Claude Code +9 - 0.787score
lsp-generate
blackwell-systems
Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types.
SkillAFreshness: A★ 164Claude Code +9 - 0.787score
lsp-refactor
blackwell-systems
End-to-end safe refactor workflow — blast-radius analysis, speculative preview, apply to disk, verify build, run affected tests.
SkillAFreshness: A★ 164Claude Code +9 - 0.785score
lsp-inspect
blackwell-systems
Full code quality audit for a file, package, or directory.
SkillAFreshness: A★ 164Claude Code +9
Signals
- Stars
- 164
- Forks
- 20
- Open issues
- 5
- Contributors
- 9
- Last commit (this folder)
- May 10, 2026 (5 months ago)
- Last release
- Oct 24, 2026 (4 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/blackwell-systems/agent-lsp
- Website
- www.agent-lsp.com/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from blackwell-systems
- 0.791score
lsp-impact
blackwell-systems
Blast-radius analysis for a symbol or file — shows all callers, type supertypes/subtypes, and reference count before you change it.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-simulate
blackwell-systems
Speculative code editing session — simulate changes in memory before touching disk.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-edit-export
blackwell-systems
Safe workflow for editing exported symbols or public APIs.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-dead-code
blackwell-systems
Enumerate exported symbols in a file and surface those with zero references across the workspace.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-rename
blackwell-systems
Two-phase safe rename across the entire workspace.
SkillAFreshness: A★ 164Claude Code +9 - 0.791score
lsp-understand
blackwell-systems
Deep-dive exploration of unfamiliar code — given a symbol or file, builds a complete Code Map showing type info, implementations, call hierarchy (2-level…
SkillAFreshness: A★ 164Claude Code +9
Cite this page
lsp-fix-all skill. Agent Mart. https://agentmart.dev/skills/blackwell-systems-lsp-fix-all (last updated 2026-10-24)