Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

lspLSP 搜索

Agent Skill

lsp 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

15,475

周安装

626

GitHub Stars

公开资料未说明

下载量

4,858
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:lsp(LSP 搜索)
来源仓库:https://github.com/adamnaghs/lsp
安装命令:
openclaw skills install lsp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install lsp

简介

通过持久LSP守护程序实现多语言代码导航与智能提示。

  • 支持Python、TypeScript、Rust等主流编程语言。
  • 提供转到定义、查找引用、悬停类型信息等功能。
  • 需安装对应语言服务器并配置项目根目录。
  • 网络不稳定可能影响实时诊断准确性。lsp 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
lsp
description
Multi-language code navigation via persistent LSP daemons. Supports Python (pyright), TypeScript/JS, Rust, Go, C/C++, Bash, Java, CSS, HTML, JSON. Auto-detects language from file extension and lazy-starts the appropriate server. Use instead of grep for definitions, references, hover, symbols, and diagnostics.
metadata
{"clawdbot":{"emoji":"","requires":{"bins":["python3"]}}}

LSP Code Navigation

Multi-language LSP client that manages per-language background daemons. Auto-detects the language from file extension and routes queries to the correct server. Each server lazy-starts on first use and idles out after 5 minutes of inactivity.

Use this instead of grep/read when you need to:

  • Find where something is defined
  • Find all usages of a symbol
  • Get type signatures or docstrings
  • List all classes/functions in a file
  • Check for type errors before running code
  • Search for a symbol across an entire workspace

Supported Languages

LanguageServerExtensionsInstall
Pythonpyright-langserver.py, .pyi, .pyxnpm install -g pyright
TypeScript/JStypescript-language-server.ts, .tsx, .js, .jsx, .mjs, .cjsnpm install -g typescript-language-server typescript
Rustrust-analyzer.rsrustup component add rust-analyzer
Gogopls.gogo install golang.org/x/tools/gopls@latest
C/C++clangd.c, .h, .cpp, .cc, .hppapt install clangd or brew install llvm
Bashbash-language-server.sh, .bash, .zshnpm install -g bash-language-server
Javajdtls.javaeclipse.jdt.ls
CSSvscode-css-language-server.css, .scss, .lessnpm install -g vscode-langservers-extracted
HTMLvscode-html-language-server.html, .htmnpm install -g vscode-langservers-extracted
JSONvscode-json-language-server.json, .jsoncnpm install -g vscode-langservers-extracted

Only install the servers you need. The skill auto-detects which are available and reports helpful install commands for missing ones.

Setup

Prerequisites

  • Python 3.10+ (for the client script itself -- stdlib only, no pip deps)
  • At least one language server installed (see table above)

Installation

The skill includes a Python script at {baseDir}/scripts/lsp-query.py. This is the LSP client -- it manages background daemons and handles all queries.

To make it callable as lsp-query from anywhere, symlink it into your PATH:

ln -sf {baseDir}/scripts/lsp-query.py /usr/local/bin/lsp-query
# or:
ln -sf {baseDir}/scripts/lsp-query.py ~/.npm-global/bin/lsp-query

Alternatively, invoke it directly:

{baseDir}/scripts/lsp-query.py <command> [args...]

Configuration

Set LSP_WORKSPACE to the repo root before querying. If unset, defaults to the git root or cwd.

Commands

All line and column numbers are 1-indexed (human-friendly, matching editor display).

Go to Definition

lsp-query definition /path/to/file.py <line> <col>

Find References

lsp-query references /path/to/file.py <line> <col>

Hover (Type Info)

lsp-query hover /path/to/file.py <line> <col>

Document Symbols

lsp-query symbols /path/to/file.py

Workspace Symbol Search

lsp-query workspace-symbols "ClassName"

Diagnostics

lsp-query diagnostics /path/to/file.py

Completions

lsp-query completions /path/to/file.py <line> <col>

Signature Help

lsp-query signature /path/to/file.py <line> <col>

Rename Preview

lsp-query rename /path/to/file.py <line> <col> new_name

Server Management

lsp-query languages                    # Show all supported languages + install status
lsp-query servers                      # List running language daemons
lsp-query shutdown                     # Stop all daemons
lsp-query shutdown python              # Stop just the Python daemon

What's Included

{baseDir}/
├── SKILL.md              # This file
└── scripts/
    └── lsp-query.py      # Python script -- multi-language LSP client + daemon manager

lsp-query.py is a self-contained Python script (~850 lines, stdlib only, no pip dependencies). It:

  1. Forks a single background daemon process on first use
  2. The daemon lazy-starts language servers as needed (e.g., pyright for .py, typescript-language-server for .ts)
  3. Communicates with the daemon over a Unix socket (~/.cache/lsp-query/daemon.sock)
  4. Translates CLI commands into LSP JSON-RPC requests and prints human-readable results
  5. Each language server auto-stops after 5 minutes idle; the daemon itself stops when all servers are idle

Environment Variables

VariableDefaultDescription
LSP_WORKSPACEgit root or cwdWorkspace root for LSP servers
LSP_SERVERauto per languageOverride server command for ALL languages
LSP_LANGauto from extensionForce a specific language (bypass detection)
LSP_TIMEOUT300Server idle timeout in seconds
LSP_SOCK~/.cache/lsp-query/daemon.sockUnix socket path

Examples

export LSP_WORKSPACE=/path/to/repo

# Python
lsp-query symbols src/model.py
lsp-query hover src/model.py 42 10
lsp-query references src/model.py 42 10

# TypeScript (auto-detected from .ts extension)
lsp-query symbols src/index.ts
lsp-query definition src/app.tsx 15 8

# Rust
lsp-query symbols src/main.rs
lsp-query diagnostics src/lib.rs

# Check what's available
lsp-query languages
lsp-query servers

Troubleshooting

  • "Server not found for X": The language server binary isn't installed. The error message includes the install command.
  • "could not connect to LSP daemon": Daemon failed to start. Verify Python 3.10+ is available.
  • Import errors in diagnostics: Expected when packages aren't installed in the current Python environment. These resolve on machines with the correct venv.
  • Stale results: Run lsp-query shutdown to restart all servers fresh.
  • Slow first query per language: Each server takes 1-2 seconds to cold-start. Subsequent queries to the same language are ~200ms.
  • Wrong language detected: Use LSP_LANG=rust lsp-query symbols myfile to force.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

74.81%
按下载量换算3,634

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills