knowledge-extension-ecosystem-lsp-code-intelligence

knowledge-extension-ecosystem-lsp-code-intelligence is a skill for Claude Code from echoVic/blade-code. It costs 161 tokens per session (2,653 once invoked), scanned A, original, MIT.

A codebase guide to LSP, the standard protocol behind editor features such as symbol queries, file diagnostics, and language-aware code information.

In plain words
What is it for?
Use it when adding language servers, changing LSP tools, debugging missing or duplicate diagnostics, or fixing process and workspace-session issues.
Why use it?
It explains how language-server processes are started per session, kept in sync after edits, and recovered after failures.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: mentions subagents.

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/echovic/blade-code/lsp-code-intelligence
Any agent
npx skills add echoVic/blade-code --skill lsp-code-intelligence
Clone the repo
git clone --depth 1 https://github.com/echoVic/blade-code

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 knowledge-extension-ecosystem-lsp-code-intelligence

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/blade-code/lsp-code-intelligence.svg)](https://agentmods.dev/skills/echovic/blade-code/lsp-code-intelligence)
Your own site
<a href="https://agentmods.dev/skills/echovic/blade-code/lsp-code-intelligence"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/lsp-code-intelligence.svg" alt="Measured on agentmods" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,653 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.00161 $0.02653
Opus 5 $0.00081 $0.01326
Sonnet 5 $0.00032 $0.00531
Haiku 4.5 $0.00016 $0.00265

Measured 2d ago against content hash fc80b8c1ef77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

knowledge-extension-ecosystem-lsp-code-intelligence 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.trae/knowledges/extension-ecosystem/lsp-code-intelligence/SKILL.md · 114 lines

How it starts

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

Module Structure

LSP 配置按 source project 解析并冻结,SessionRuntime 再以 execution workspace 创建私有 manager;语言服务器按目标文件扩展名懒启动,语义查询和写后诊断共享同一连接。

Directory Layout

  • packages/cli/src/lsp/ — LSP client、Session manager 与 Workspace 资源快照
  • packages/cli/src/config/lspSettings.ts — LSP server 配置规范化和硬边界
  • packages/cli/src/tools/builtin/lsp/ — ReadOnly LSP 工具与协议结果格式化
  • packages/cli/src/ide/ — IDE 检测和 Blade IDE 扩展安装入口
  • docs/reference/lsp-session-intelligence.md — Session LSP 行为契约与资格要求

Key Entry Points

  • resolveWorkspaceLspResources() in packages/cli/src/lsp/WorkspaceLspResources.ts — 合并用户、项目和插件服务器并冻结快照
  • LspSessionManager.query() in packages/cli/src/lsp/LspSessionManager.ts — 执行语义查询
  • LspSessionManager.afterToolUse() in packages/cli/src/lsp/LspSessionManager.ts — 写后同步并回注新诊断
  • LspClient.start() / LspClient.stop() in packages/cli/src/lsp/LspClient.ts — 管理 stdio JSON-RPC 与 owned process tree
  • createLspTool() in packages/cli/src/tools/builtin/lsp/lsp.ts — 将 manager 暴露为统一只读工具

API Surface

Workspace LSP Resources

  • resolveWorkspaceLspResources(projectRoot, base) — 合并 Workspace 配置和插件 .lsp.json
  • snapshotWorkspaceLspResources(resources) — 规范化、深拷贝并冻结 Session 配置

LspSessionManager

  • available — 仅在存在启用服务器、Session 非 ACP remote 且未 dispose 时为真
  • query(input, signal) — 路由 definition、references、hover、symbols、implementation、call hierarchy 或 diagnostics
  • afterToolUse(toolName, params, result, context) — 同步成功写操作并把新诊断追加到 ToolResult
  • getStatus() — 返回服务器状态、重启次数、扩展映射和最近错误
  • dispose() — 解除 waiter、发送 shutdown/exit 并回收所有服务器进程

LspClient

  • start(options) / initialize(params, timeout, signal) — 建立 stdio transport 与协议握手
  • request(method, params, timeout, signal) — 带 JSON-RPC cancellation 和本地 timeout 的请求
  • stop(timeout) — 尝试协议关闭后以 owned process tree 作为最终回收边界

Usage Examples

Session 创建私有 Manager (packages/cli/src/agent/runtime/SessionRuntime.ts)

this.lspManager = new LspSessionManager({
  sessionId: this.sessionId,
  workspaceRoot: this.workspaceRoot,
  environment: this.sessionEnvironment,
  servers: this.lspResources.servers,
});

Read the full file on GitHub · 114 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. 2d ago First seen · 114 lines · 161 tokens per session scan A fc80b8c1ef77

Subscribe to this mod's changes

knowledge-extension-ecosystem-lsp-code-intelligence is a skill published in the GitHub repository echoVic/blade-code (178 stars, last pushed today), licensed MIT. It adds 161 tokens to every session and 2,653 once invoked, about $0.0008 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-09-03.