lsp-simulate

lsp-simulate is a skill for Claude Code from blackwell-systems/agent-lsp. It costs 45 tokens per session (1,820 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.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.svg" alt="Measured on agentmods" 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,820 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.01820
Opus 5 $0.00023 $0.00910
Sonnet 5 $0.00009 $0.00364
Haiku 4.5 $0.00005 $0.00182

Measured 8d ago against content hash 38b7be488048, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 8d 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__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 }

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. 8d 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 (122 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,820 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

trace-mcp

Use trace-mcp tools for code navigation, impact analysis, and framework-aware queries instead of Read/Grep/Glob/Bash. Activate whenever the agent needs to explore, understand, or modify a codebase that has trace-mcp indexed.

nikolai-vysotskyi/trace-mcp · 52 tokens

dead-code-cleanup

Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size, or identifying dead code in a Repowise-indexed codebase (.repowise/ directory exists). Also activates when discussing technical debt, code hygiene, or repository maintenance.

repowise-dev/repowise · 59 tokens

authoring-smell-rules

Add a findsmells rule to mache — a SQL query over the projected code graph that surfaces a code smell (duplication, complexity, dead code, drift). Use when adding or debugging a SmellRule in cmd/smellrules.go or an external $MACHESMELLRULESDIR rule. Covers the SmellRule struct, the standalone-vs-ast table capability…

agentic-research/mache · 102 tokens

Sverklo Code Intelligence

Gives you deep codebase understanding — semantic search, blast-radius analysis, PR review, and health audits.

sverklo/sverklo · 27 tokens

m1nd-first

Use when investigating a repository, searching for implementation, reviewing changes, working from specs/docs, or preparing a risky code change in an environment where m1nd is available. This doctrine makes m1nd the first investigative layer before grep, glob, or manual file reads, except when the task is pure…

maxkle1nz/m1nd · 78 tokens

analyze-usage

Use when asked to analyze codescout tool usage, check for error patterns, audit tool health, generate a usage report, spot anti-patterns, or clear usage statistics to start fresh.

mareurs/codescout · 42 tokens