Agent skill

Lsp Simulate

by blackwell-systems in blackwell-systems/agent-lsp

Speculative code editing session — simulate changes in memory before touching disk.

MITAuto-check passedDevelopment

Install Lsp Simulate

skills CLI
$ npx skills add blackwell-systems/agent-lsp --skill lsp-simulate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install blackwell-systems/agent-lsp lsp-simulate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/blackwell-systems/agent-lsp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lsp-simulate .claude/skills/lsp-simulate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lsp-simulate
GitHub stars
159
Token cost
~1.8k tokens
SKILL.md length
495 words
Files
2 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Speculative code editing session — simulate changes in memory before touching disk.

  • Planning edits that might break things
  • SKILL.md covers Prerequisites, Quick Start (single edit), Full Session Workflow… and Chained Mutations…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Exploring refactors across multiple files

What it does

Lsp Simulate is an agent skill from blackwell-systems/agent-lsp. 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.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/patterns.md`). Compatibility notes: Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)

It sits in Development, covering Refactoring. The repository describes itself as: MCP server that orchestrates language servers into agent-native workflows. 65 tools, 30 CI-verified languages. The licence is MIT.

When your agent uses it

  • Planning edits that might break things
  • Exploring refactors across multiple files
  • Verifying an edit is safe before applying

Example prompts

  • “/lsp-simulate”

Requirements

  • Compatibility (from SKILL.md): Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
  • Pre-approved tools (allowed-tools): mcp__lsp__start_lsp, mcp__lsp__create_simulation_session, mcp__lsp__simulate_edit, mcp__lsp__simulate_chain, mcp__lsp__evaluate_session, mcp__lsp__commit_session, mcp__lsp__discard_session, mcp__lsp__destroy_session, mcp__lsp__preview_edit

What it can do on your machine

Read from SKILL.md and the folder at commit 6fa5faf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • mcp__lsp__start_lsp
    • mcp__lsp__create_simulation_session
    • mcp__lsp__simulate_edit
    • mcp__lsp__simulate_chain
    • mcp__lsp__evaluate_session
    • mcp__lsp__commit_session
    • mcp__lsp__discard_session
    • mcp__lsp__destroy_session
    • mcp__lsp__preview_edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)

    From compatibility in the SKILL.md frontmatter.

Context cost

Lsp Simulate loads about 1.8k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 495 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from blackwell-systems/agent-lsp at commit 6fa5faf, republished under its MIT licence (© blackwell-systems). 495 words, ~1,812 tokens.

Download SKILL.mdSave it as .claude/skills/lsp-simulate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
lsp-simulate
description
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.
allowed-tools
mcp__lsp__start_lsp, mcp__lsp__create_simulation_session, mcp__lsp__simulate_edit, mcp__lsp__simulate_chain, mcp__lsp__evaluate_session, mcp__lsp__commit_session, mcp__lsp__discard_session, mcp__lsp__destroy_session, mcp__lsp__preview_edit
compatibility
Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
user-invocable
true
license
MIT

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__create_simulation_session(
  workspace_root: "/your/workspace",
  language: "go"
)
→ { session_id: "abc123" }

Step 2 — Apply edits in-memory

Call simulate_edit one or more times. All edits are in-memory only. Positions are 1-indexed (matching editor line numbers and cat -n output).

mcp__lsp__simulate_edit(
  session_id: "abc123",
  file_path: "/abs/path/to/file.go",
  start_line: 10, start_column: 1,
  end_line: 10, end_column: 30,
  new_text: "func NewClient(cfg Config) *Client {"
)
→ { session_id: "abc123", edit_applied: true, version_after: 1 }

Repeat for additional edits as needed.

Step 3 — Evaluate the session

mcp__lsp__evaluate_session(
  session_id: "abc123",
  scope: "file"
)
→ {
    net_delta: 0,
    confidence: "high",
    errors_introduced: [],
    errors_resolved: [],
    edit_risk_score: 0.0,
    affected_symbols: []
  }

scope: "file" (default) is faster and returns confidence: "high". scope: "workspace" catches cross-file type errors but returns confidence: "eventual" (results may not be fully settled).

Step 4 — Decision gate

If net_delta == 0, proceed to commit. Otherwise, discard:

mcp__lsp__discard_session(session_id: "abc123")

Step 5 — Commit the session

-- Preview patch only (no disk write):
mcp__lsp__commit_session(session_id: "abc123", apply: false)

-- Write to disk:
mcp__lsp__commit_session(session_id: "abc123", apply: true)

Step 6 — Destroy the session (always)

mcp__lsp__destroy_session(session_id: "abc123")

Always call destroy_session after commit or discard to release server resources. See Cleanup Rule below.

Chained Mutations (simulate_chain)

Use simulate_chain when you have a sequence of edits and want to find how far through the sequence is safe to apply. Unlike multiple simulate_edit calls, simulate_chain evaluates diagnostics after each step.

mcp__lsp__simulate_chain(
  session_id: "abc123",
  edits: [
    { file_path: "/abs/file.go", start_line: 5, start_column: 1,
      end_line: 5, end_column: 40, new_text: "type Foo struct { Bar int }" },
    { file_path: "/abs/file.go", start_line: 20, start_column: 1,
      end_line: 20, end_column: 10, new_text: "f.Bar" },
    { file_path: "/abs/other.go", start_line: 8, start_column: 1,
      end_line: 8, end_column: 10, new_text: "x.Bar" }
  ]
)
→ {
    steps: [
      { step: 1, net_delta: 0, errors_introduced: [] },
      { step: 2, net_delta: 0, errors_introduced: [] },
      { step: 3, net_delta: 1, errors_introduced: [...] }
    ],
    safe_to_apply_through_step: 2,
    cumulative_delta: 1
  }

safe_to_apply_through_step: 2 means steps 1 and 2 are safe; step 3 introduced errors. Commit the session after reviewing to apply steps 1–2, or discard to cancel everything.

Show full SKILL.md (173 more words)Show less

Decision Guide

net_deltaconfidenceAction
0highSafe. Commit or apply.
0eventualLikely safe. Workspace scope — re-evaluate if risk matters.
> 0anyDo NOT apply. Inspect errors_introduced. Discard session.
> 0partialTimeout. Results incomplete. Discard and retry with smaller scope.

Session States

StateMeaningNext step
createdSession initialized, no edits yetsimulate_edit
mutatedOne or more edits applied in-memoryevaluate_session
evaluatedDiagnostics collectedcommit or discard
committedPatch returned (and optionally written to disk)destroy_session
discardedIn-memory edits reverted, no disk writedestroy_session
dirtyRevert failed or version mismatch; session is inconsistentdestroy_session only

A session in dirty state cannot be recovered — call destroy_session immediately.

Cleanup Rule

Always call destroy_session after finishing a session, even on error paths:

-- After commit:
mcp__lsp__commit_session(session_id: "abc123", apply: true)
mcp__lsp__destroy_session(session_id: "abc123")

-- After discard:
mcp__lsp__discard_session(session_id: "abc123")
mcp__lsp__destroy_session(session_id: "abc123")

MCP server restart: Sessions are ephemeral — they live in server memory only. If the MCP server restarts, all session IDs become invalid. To preserve work across a restart, call commit_session(apply: false) first to get a portable patch, then re-apply it after the server restarts.

See references/patterns.md for detailed field descriptions and confidence interpretation.

© blackwell-systems, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/lsp-simulate of blackwell-systems/agent-lsp.

  • SKILL.md
  • references/patterns.md

Open the folder on GitHubat commit 6fa5faf

Compare with similar skills

Lsp Simulate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lsp Simulate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lsp Simulate this skillblackwell-systems/agent-lsp159—~1.8kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Filescope MCPadmica/FileScopeMCP302—~1.7kAutomated safety check: PassProprietary
Gograph Go Repository Intelligenceozgurcd/gograph227—~4.8kAutomated safety check: NotesMIT
Auto DevflowHuangPuStar/FenixAgent552—~3kAutomated safety check: PassApache-2.0
Skill Writingmillionco/expect3.6k—~1.8kAutomated safety check: PassCustom licence

Similar skills

  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Filescope MCP

    admica/FileScopeMCP

    Codebase intelligence via FileScopeMCP — symbol lookup, dependency mapping, importance ranking, and semantic search.

    302 GitHub stars~1.7k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Gives an agent working in a Go codebase a structural view through a local MCP server: call graphs, blast-radius and impact analysis, and bounded first-call exploration.

    227 GitHub stars~4.8k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Auto Devflow

    HuangPuStar/FenixAgent

    A skill your agent uses when starting an issue, bugfix, feature, or refactor that should be driven by multiple coordinated subagents: explore → plan → code → review, with the main agent acting as…

    552 GitHub stars~3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Skill Writing

    millionco/expect

    Write and improve agent skills (SKILL.md files). An agent skill from millionco/expect.

    3.6k GitHub stars~1.8k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Ss Cpp Modern

    Serial-Studio/Serial-Studio

    Modern C++20 authoring guidance for Serial Studio (Qt 6.11, C++20): concepts, ranges, move/RAII, std smart pointers, constexpr, lock-free SPSC atomics.

    7.2k GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from blackwell-systems/agent-lsp

All 24 skills in this repo
  • Lsp Dead Code

    blackwell-systems/agent-lsp

    Enumerate exported symbols in a file and surface those with zero references across the workspace.

    159 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Lsp Edit Export

    blackwell-systems/agent-lsp

    Safe workflow for editing exported symbols or public APIs. An agent skill from blackwell-systems/agent-lsp.

    159 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Lsp Fix All

    blackwell-systems/agent-lsp

    Apply available quick-fix code actions for all current diagnostics in a file, one at a time with re-collection between each fix.

    159 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Lsp Generate

    blackwell-systems/agent-lsp

    Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types.

    159 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Lsp Impact

    blackwell-systems/agent-lsp

    Blast-radius analysis for a symbol or file — shows all callers, type supertypes/subtypes, and reference count before you change it.

    159 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Lsp Rename

    blackwell-systems/agent-lsp

    Two-phase safe rename across the entire workspace. An agent skill from blackwell-systems/agent-lsp.

    159 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Questions about Lsp Simulate

What does Lsp Simulate do?

Speculative code editing session — simulate changes in memory before touching disk. Lsp Simulate is an agent skill from blackwell-systems/agent-lsp. Speculative code editing session — simulate changes in memory before touching disk.

When should I use Lsp Simulate?

Lsp Simulate fits situations like: planning edits that might break things; exploring refactors across multiple files; verifying an edit is safe before applying.

How do I install Lsp Simulate in Claude Code?

Run `npx skills add blackwell-systems/agent-lsp --skill lsp-simulate -a claude-code`. Or copy the skill folder (skills/lsp-simulate in blackwell-systems/agent-lsp) into .claude/skills/lsp-simulate in your project. Claude Code loads it when a task matches its description.

How do I install Lsp Simulate in Codex?

Run `npx skills add blackwell-systems/agent-lsp --skill lsp-simulate -a codex`. Or copy the skill folder (skills/lsp-simulate in blackwell-systems/agent-lsp) into .agents/skills/lsp-simulate in your project. Codex loads it when a task matches its description.

Can I use Lsp Simulate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add blackwell-systems/agent-lsp --skill lsp-simulate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lsp-simulate, .gemini/skills/lsp-simulate, .github/skills/lsp-simulate and .opencode/skills/lsp-simulate in your project.

What does Lsp Simulate need to run?

SKILL.md names no scripts, command-line tools or credentials: Lsp Simulate is instructions for the agent only. Its frontmatter pre-approves these tools: mcp__lsp__start_lsp, mcp__lsp__create_simulation_session, mcp__lsp__simulate_edit, mcp__lsp__simulate_chain, mcp__lsp__evaluate_session, mcp__lsp__commit_session, mcp__lsp__discard_session, mcp__lsp__destroy_session, mcp__lsp__preview_edit. Compatibility (from SKILL.md): Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp).

Does Lsp Simulate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lsp Simulate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lsp Simulate use?

Lsp Simulate is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lsp Simulate use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Lsp Simulate?

Skills that share tags, products or a category with Lsp Simulate: Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Filescope MCP (admica/FileScopeMCP, 302 stars), Gograph Go Repository Intelligence (ozgurcd/gograph, 227 stars) and Auto Devflow (HuangPuStar/FenixAgent, 552 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lsp Simulate?

blackwell-systems (a GitHub user) maintains it in blackwell-systems/agent-lsp, which has 159 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 7, 2026.

Source: blackwell-systems/agent-lsp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.