跳到正文
Skillpedia
通用编程5.2k · #15021

lsp-maintain

它能做什么

它会检查 Kode 已配置了哪些语言服务器,并找出应该添加缺失服务器的插件或设置。适合使用 Kode 时发现某种编程语言没有代码提示的人。

适用场景

  • ✓当 Kode 中缺少代码提示或查找功能时。
  • ✓当语言服务器被关闭,你想让它重新工作时。
  • ✓当你想为新的编程语言添加语言服务器时。

技能链接

https://github.com/shareAI-lab/Kode-CLI/blob/main/packages/builtin-skills/skills/lsp-maintain/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/shareAI-lab/Kode-CLI/blob/main/packages/builtin-skills/skills/lsp-maintain/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的 Python 文件在 Kode 里没有代码提示。请帮我查明原因并修好。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查已配置的服务器列表,追踪每个服务器对应的插件,然后通过 Kode 的命令做一个小改动。改动完成后,它会再次检查服务器列表。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

LSP Maintain (Reference-aligned)

Non-negotiables (policy)

  • Do not respond with menu-style instructions like “run /lsp-maintain install” or “run /lsp-maintain doctor”.
  • Prefer executing capability changes through SlashCommand (e.g. /plugin ..., /lsp) or Edit to configuration files.
  • Keep the conversation focused: only load deeper resources if absolutely necessary.

What “LSP enabled” means in Kode

Kode’s LSP tool is enabled only when there is at least one resolved LSP server and at least one is not in error.

Step 1 — Establish facts (no guessing)

  1. Ask for the user goal (languages, monorepo vs single package, whether they already use plugins).
  2. Run /lsp via SlashCommand and read the “Configured servers” list.
  3. If there are zero servers, conclude: no LSP servers are configured (do not speculate about missing binaries).

Step 2 — Identify configuration source (plugin-only)

Kode resolves LSP servers from enabled plugins:

  • Plugin root .lsp.json (JSON, top-level record)
  • Plugin manifest field lspServers (inline record or relative file path within plugin root)

If the user needs a new server, the correct path is: enable a plugin that provides it, or add/update a plugin’s .lsp.json.

Step 3 — Apply changes through agent CLI

Prefer:

  • Use SlashCommand to manage plugins (/plugin ...) and re-check with /lsp.
  • Use Edit to update the plugin’s .lsp.json or manifest lspServers record/file.

Step 4 — Verify

  1. Re-run /lsp and confirm servers are resolved.
  2. Attempt one LSP tool call (e.g. goToDefinition) on a file extension that is mapped in extensionToLanguage.

Notes for LSP server config authoring

  • command must be an executable (avoid embedding arguments; use args).
  • Kode runs servers using stdio pipes.
  • Do not use restartOnCrash, startupTimeout, or shutdownTimeout in the config (Kode treats them as unsupported).
常见问题

它会让我运行安装菜单吗?

不会。它会启用提供该服务器的插件,或向插件添加配置文件。

如果完全没有配置服务器怎么办?

该技能会判断当前没有设置语言服务器,然后通过插件添加一个,而不是凭猜测行事。

我怎么知道修复成功了?

改动后,该技能会再次检查服务器列表。

详情

作者的原始描述

Diagnose and align Kode LSP behavior with the reference CLI (plugin-based .lsp.json, stdio-only, no install menus). Use when LSP results are missing, LSP is disabled, or you need to configure plugin LSP servers without telling the user to run menu-style install commands.

repo: shareAI-lab/Kode-CLI

热度

GitHub 星标
5.2k
排名
#15021
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能