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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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) orEditto 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)
- Ask for the user goal (languages, monorepo vs single package, whether they already use plugins).
- Run
/lspviaSlashCommandand read the “Configured servers” list. - 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
SlashCommandto manage plugins (/plugin ...) and re-check with/lsp. - Use
Editto update the plugin’s.lsp.jsonor manifestlspServersrecord/file.
Step 4 — Verify
- Re-run
/lspand confirm servers are resolved. - Attempt one
LSPtool call (e.g.goToDefinition) on a file extension that is mapped inextensionToLanguage.
Notes for LSP server config authoring
commandmust be an executable (avoid embedding arguments; useargs).- Kode runs servers using stdio pipes.
- Do not use
restartOnCrash,startupTimeout, orshutdownTimeoutin 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
评论
- …
同一仓库的更多技能
capabilities-manage
5.2k帮你的智能体通过简单的请求,开启、关闭或调整 Kode CLI 的功能,例如语言服务器、状态栏和插件。
doc-coauthoring
5.2k帮你的智能体把零散的笔记整理成清晰的提案、规格或决策文档,再请一位新读者来检查。
mcp-builder
5.2k指导你的智能体构建一个 MCP 服务器,为 AI 提供清晰、命名合理的操作,用于连接外部服务,可使用 TypeScript 或 Python。
permissions-debug
5.2k帮你的智能体查明 Kode 为何一直阻止或反复询问某个工具,并以安全、小幅的方式修改权限设置。