lsp-simulate

lsp-simulate is a skill for Claude Code from blackwell-systems/agent-lsp. It costs 45 tokens per session (1,843 once invoked), scanned A, original, MIT.

A safety check for proposed code edits that applies changes in memory and runs language-server diagnostics before files are changed. A language server is a tool that detects code errors and related problems.

In plain words
What is it for?
Use it to preview risky edits, explore refactors, and check whether planned changes are safe in a supported code workspace.
Why use it?
It lets you test whether a refactor or multi-file edit introduces new errors before writing anything to disk.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to preview risky edits, explore refactors, and check whether planned changes are safe in a supported code workspace.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blackwell-systems/agent-lsp/lsp-simulate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add blackwell-systems/agent-lsp --skill lsp-simulate
Clone the repo
git clone --depth 1 https://github.com/blackwell-systems/agent-lsp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lsp-simulate

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackwell-systems/agent-lsp/lsp-simulate/github.svg)](https://agentmods.dev/skills/blackwell-systems/agent-lsp/lsp-simulate)
Your own site
<a href="https://agentmods.dev/skills/blackwell-systems/agent-lsp/lsp-simulate"><img src="https://agentmods.dev/badge/skills/blackwell-systems/agent-lsp/lsp-simulate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lsp-simulate

Your own site · 80×15
<a href="https://agentmods.dev/skills/blackwell-systems/agent-lsp/lsp-simulate"><img src="https://agentmods.dev/badge/skills/blackwell-systems/agent-lsp/lsp-simulate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01843
Opus 5.5 $0.00018 $0.00737
Sonnet 5.5 $0.00009 $0.00369
Haiku 4.5 $0.00005 $0.00184

Measured 25d ago against content hash bca78d839e34, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lsp-simulate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/lsp-simulate/SKILL.md · 214 lines

How it starts

The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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__agent-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__agent-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__agent-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__agent-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 }

Read the full file on GitHub · 214 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed bca78d839e34
  2. 3mo ago First seen · 214 lines · 45 tokens per session scan A 38b7be488048

Subscribe to this mod's changes

lsp-simulate is a skill published in the GitHub repository blackwell-systems/agent-lsp (186 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,843 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

lsp-simulate compared with skills from other repositories

lsp-simulate next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lsp-simulateblackwell-systems/agent-lspSkill186todayMITA45Claude Code
authoring-smell-rulesagentic-research/macheSkill46todayApache-2.0A102Claude Code
x-raybartolli/codannaSkill7638d agoApache-2.0A25Claude Code
roamCranot/roam-codeSkill5173d agoApache-2.0A86Claude Code
mma-investigatorcockroachdb/cockroachSkill33k11d agononeA47Claude Code
pi-loop-forensicsdimetron/pi-goSkill2326d agoMITA65Claude Code, Codex
verify-history-rewritedimetron/pi-goSkill2326d agoMITA130Claude Code, Codex