关于
This skill performs cross-repository analysis to find all callers of a library symbol across multiple consumer codebases. It's essential when refactoring shared libraries to understand downstream usage patterns. The skill leverages LSP capabilities like references and call hierarchy providers through the agent-lsp MCP server.
快速安装
Claude Code
推荐npx skills add blackwell-systems/agent-lsp -a claude-code/plugin add https://github.com/blackwell-systems/agent-lspgit clone https://github.com/blackwell-systems/agent-lsp.git ~/.claude/skills/lsp-cross-repo在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Requires the agent-lsp MCP server.
lsp-cross-repo
Multi-root cross-repo caller analysis for library + consumer workflows. Finds all usages of a library symbol across one or more consumer codebases in a single call.
Read-only — does not modify any files.
When to use
- Before changing a library API: find all callers in every consumer
- Before deleting a symbol: verify it has no cross-repo dependents
- When a change in repo A might break repo B or C
- Auditing how internal packages are used across services
Use /lsp-impact instead for single-repo blast-radius analysis.
Workflow
Step 1 — Initialize the primary workspace
Start the language server on the library root if not already running:
mcp__lsp__start_lsp({ "root_dir": "/path/to/library" })
Step 2 — Locate the library symbol
Find the symbol's definition to get file_path, line, and column:
mcp__lsp__find_symbol({ "query": "<symbol-name>" })
Pick the result in the library repo (not a test file).
Step 3 — Find all cross-repo references (primary step)
Call get_cross_repo_references with the symbol location and all consumer repo
roots. This adds each consumer as a workspace folder, waits for indexing, runs
find_references across all roots, and returns results partitioned by repo:
mcp__lsp__get_cross_repo_references({
"symbol_file": "/abs/path/to/library/file.go",
"line": <line>,
"column": <column>,
"consumer_roots": [
"/abs/path/to/consumer-a",
"/abs/path/to/consumer-b"
]
})
Returns:
library_references— usages within the library itselfconsumer_references— a map ofconsumer-root → [file:line ...]warnings— any roots that could not be indexed (check these manually)
Decision after Step 3:
| Result | Action |
|---|---|
| No consumer refs | Safe to change — verify warnings is empty first |
| Consumer refs found | Run /lsp-impact on each call site before editing |
warnings non-empty | Re-add that root manually and retry Step 3 |
Step 4 — Callers and implementations (optional)
For a deeper look at how consumers call the symbol:
mcp__lsp__find_callers({
"file_path": "<library-file>",
"line": <line>,
"column": <column>,
"direction": "incoming"
})
For interfaces — all consumer-side implementations:
mcp__lsp__go_to_implementation({
"file_path": "<library-file>",
"line": <line>,
"column": <column>
})
Output format
## Library-internal references
- file:line — brief context
## Consumer references
### /path/to/consumer-a
- file:line — brief context
### /path/to/consumer-b
- file:line — brief context
Decision guide
| Situation | Action |
|---|---|
| No consumer refs, warnings empty | Safe to change |
| Consumer refs found | Run /lsp-impact on each call site before editing |
warnings lists a consumer root | That root failed indexing — check LSP logs |
| Consumer uses interface, not concrete type | Use go_to_implementation to find all implementors |
Example
# Refactoring ParseConfig in a shared config library used by 3 services
start_lsp(root_dir="/repos/config-lib")
find_symbol(query="ParseConfig") # find definition → file:42:6
get_cross_repo_references(
symbol_file="/repos/config-lib/pkg/config/parser.go",
line=42, column=6,
consumer_roots=["/repos/api-service", "/repos/worker-service", "/repos/batch-job"]
)
# → library_references: 2
# → consumer_references: {api-service: [main.go:14, app.go:31], worker-service: [runner.go:8]}
# → warnings: []
GitHub 仓库
常见问题
什么是 lsp-cross-repo Skill?
lsp-cross-repo 是一个 Claude Skill,作者为 blackwell-systems。Skill 将 Claude 按需加载的说明和资源打包,让 Claude 无需额外提示即可执行与 lsp-cross-repo 相关的任务。
如何安装 lsp-cross-repo?
使用本页的安装命令:将 lsp-cross-repo 作为插件添加到 Claude Code,或将其仓库克隆到 skills 目录,然后重启 Claude 以加载该 Skill。
lsp-cross-repo 属于哪个分类?
lsp-cross-repo 属于其他分类。
lsp-cross-repo 可以免费使用吗?
可以。lsp-cross-repo 已收录在 AIMCP,可免费安装。
相关推荐技能
LlamaGuard是Meta推出的7-8B参数内容审核模型,专门用于过滤LLM的输入和输出内容。它能检测六大安全风险类别(暴力/仇恨、性内容、武器、违禁品、自残、犯罪计划),准确率达94-95%。开发者可通过HuggingFace、vLLM或Sagemaker快速部署,并能与NeMo Guardrails集成实现自动化安全防护。
这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。
该Skill为开发者提供体育博彩数据分析工具,可分析盘口、大小球和特殊投注,识别价值投注机会。它整合历史数据和情景统计,生成包含时间戳的结构化Markdown报告。适用于需要快速获取博彩市场洞察的娱乐或教育类应用开发。
这个Skill使用bitsandbytes库量化大语言模型,能在GPU内存有限时通过8位或4位量化减少50-75%内存占用,同时保持精度损失最小。它支持INT8、NF4、FP4等多种量化格式,可与HuggingFace Transformers无缝集成,适用于需要部署更大模型或加速推理的场景。还提供QLoRA训练和8位优化器支持,让开发者能轻松实现高效模型压缩。
