lsp-simulate

Solid

Speculative code editing session — simulate changes in memory before touching disk. Use when planning edits that might break things, exploring refactors across multiple files, or verifying an edit is safe before applying.

AI & Automation 56 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

> Requires the agent-lsp MCP server. # lsp-simulate Simulate code edits in memory before writing to disk. The LSP server applies your changes to an in-memory overlay, runs diagnostics, and reports whether the edit is safe — without touching any files. ## Prerequisites LSP must be running for the target workspace. If not yet initialized, call `start_lsp` before any simulation tool. ``` mcp__lsp__start_lsp(root_dir: "/your/workspace") ``` Auto-init note: agent-lsp supports workspace auto-inference from file paths. Explicit `start_lsp` is only needed when switching workspace roots. ## Quick Start (single edit) For a single what-if check, use `preview_edit` — it creates a session, applies the edit, evaluates, and destroys the session in one call: ``` mcp__lsp__preview_edit( workspace_root: "/your/workspace", language: "go", file_path: "/abs/path/to/file.go", start_line: 42, start_column: 1, end_line: 42, end_column: 20, new_text: "replacement text" ) ``` Result: ``` { net_delta: 0 } -- safe to apply { net_delta: 2 } -- 2 new errors introduced; do NOT apply ``` `net_delta: 0` means no new errors were introduced. Positive values mean errors were introduced — inspect `errors_introduced` before deciding. ## Full Session Workflow (multiple edits) Use a full session when applying several edits that build on each other, or when you want to inspect the patch before deciding whether to write to disk. **Step 1 — Create a simulation session** ``` mcp__lsp__cr...

Details

Author
blackwell-systems
Repository
blackwell-systems/agent-lsp
Created
2 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category