add-lsp-adapter

add-lsp-adapter is a skill for Claude Code from plumbkit/plumb. It costs 58 tokens per session (1,176 once invoked), scanned A, original, MIT.

A guide and validation setup for adding a language-server adapter to the Plumb project. A language server is a program that supplies editor features such as diagnostics, which are messages about code problems.

In plain words
What is it for?
Adding a language adapter, implementing its server-specific initialization and behavior, running conformance and error-contract checks, and debugging the round trip of diagnostics.
Why use it?
It provides a fixed adapter structure and tests so new language support does not accidentally expose capabilities that the server lacks. It also defines when an experimental adapter can be treated as validated.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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.

agentmods
npx agentmods add skills/plumbkit/plumb/add-lsp-adapter
Any agent
npx skills add plumbkit/plumb --skill add-lsp-adapter
Clone the repo
git clone --depth 1 https://github.com/plumbkit/plumb

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 add-lsp-adapter

README.md
[![agentmods](https://agentmods.dev/badge/skills/plumbkit/plumb/add-lsp-adapter.svg)](https://agentmods.dev/skills/plumbkit/plumb/add-lsp-adapter)
Your own site
<a href="https://agentmods.dev/skills/plumbkit/plumb/add-lsp-adapter"><img src="https://agentmods.dev/badge/skills/plumbkit/plumb/add-lsp-adapter.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,176 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00058 $0.01176
Opus 5 $0.00029 $0.00588
Sonnet 5 $0.00012 $0.00235
Haiku 4.5 $0.00006 $0.00118

Measured 5d ago against content hash 08bccefd2b42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

add-lsp-adapter 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 5d 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.

.claude/skills/add-lsp-adapter/SKILL.md · 76 lines

How it starts

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

Adding an LSP adapter to plumb

An adapter embeds *base.Adapter (internal/lsp/adapters/base), which supplies all 23 lsp.Client methods, and shadows only what its server does differently. rust is the minimal worked example (46 lines); full guide in docs/adding-an-lsp.md.

The 5 steps

  1. Create internal/lsp/adapters/<name>/ with a doc.go stating the adapter's validation status (Experimental or Validated — see the promotion rule below).
  2. Write adapter.go: type Adapter struct{ *base.Adapter }, var _ lsp.Client = (*Adapter)(nil), func New(conn jsonrpc.Caller) *Adapter { return &Adapter{Adapter: base.New(conn, "<binary-name>")} }, and DefaultInitParams — the one genuinely per-server function. Do NOT hand-write the 23 methods.
  3. Shadow only the methods your server does differently, calling through with a.Adapter.X(ctx, params). Escape hatches are package-level FUNCTIONS — base.Call[T], base.CallPtr[T], base.CallRaw, base.Notify, base.Wrap. Never add an exported method to base.Adapter: Go promotes it into all nine adapters and internal/cli resolves optional capabilities structurally, so one stray method silently opts every server into a capability it does not have. An adapter-only capability (e.g. pull diagnostics) is declared in the adapter's own package.
  4. base.New installs BOTH transport handlers (notification fan-out + server-request handler); dispatch and handleServerRequest are unexported, so there is nothing to register and nothing to forget. Server-specific work left to you: init options, workspace model, and — for a server that answers only for open documents — a base.OpenTracker held as a NAMED field (never embedded) with an Ensure call in each affected method and a Refresh in DidChangeWatchedFiles. The set of methods needing it differs per server; do not copy another adapter's.
  5. Test: unit tests with internal/lsp/jsonrpc/mock.go covering what this adapter adds (not the inherited base); conformance.RunConformance for the protocol contract; and conformance.RunErrorContract for the "<server> <label>: <cause>" strings. Lazy-open adapters also call conformance.RunLazyOpenErrorContract.

Read the full file on GitHub · 76 lines

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. 5d ago First seen · 76 lines · 58 tokens per session scan A 08bccefd2b42

Subscribe to this mod's changes

add-lsp-adapter is a skill published in the GitHub repository plumbkit/plumb (4 stars, last pushed 5d ago), licensed MIT. It adds 58 tokens to every session and 1,176 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

nim-mcp-tools

Use for Nim symbol navigation, diagnostics, and type resolution. MANDATORY: Use specialized MCP tools (nimFindSymbols, nimFindReferences, nimListSymbols, nimCheckFile, nimCheckProject, nimFindTypeDefinition) first; fall back to grep only on error or user confirmation.

nim-lang/langserver · 64 tokens

ty-docs

Skill "ty-docs" from pledgeandgrow/pledge-skills, covering ty — python type checker and language server, key features, quick reference, configuration and pyproject.toml.

pledgeandgrow/pledge-skills · 34 tokens

yaml

Validate and understand schema-backed YAML (Kubernetes, Flux, and JSON-Schema configs) with the yayamlls language server. Use when editing or reviewing .yaml/.yml files, diagnosing schema validation errors, configuring .yayamlls.yaml, suppressing a diagnostic, or working with Flux HelmRelease / Kustomization rendering.

home-operations/yayamlls · 69 tokens

lsp-config

This skill should be used when the user asks about "LSP configuration", "language server setup", "adding LSP to Claude Code", "mason config import", "lspconfig migration", "lspctl plugin", or discusses Claude Code LSP integration and troubleshooting.

blvp/cc-lspctl · 60 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

writing

将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.

bojieli/ai-agent-book · 27 tokens