lsp-cross-repo
О программе
Этот навык выполняет кросс-репозиторный анализ для поиска всех вызовов библиотечного символа в нескольких потребительских кодовых базах. Он необходим при рефакторинге общих библиотек для понимания паттернов использования в зависимых проектах. Навык использует возможности LSP, такие как провайдеры ссылок и иерархии вызовов, через MCP-сервер agent-lsp.
Быстрая установка
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 репозиторий
Похожие навыки
llamaguard
ДругоеLlamaGuard — это модель от Meta с 7–8 миллиардами параметров для модерации входных и выходных данных больших языковых моделей по шести категориям безопасности, таким как насилие и разжигание ненависти. Она обеспечивает точность 94–95% и может быть развернута с помощью vLLM, Hugging Face или Amazon SageMaker. Используйте этот навык, чтобы легко интегрировать фильтрацию контента и защитные механизмы в ваши ИИ-приложения.
cost-optimization
ДругоеЭтот навык Claude помогает разработчикам оптимизировать облачные расходы за счет правильного подбора ресурсов, стратегий тегирования и анализа затрат. Он предоставляет framework для сокращения облачных расходов и внедрения управления затратами в AWS, Azure и GCP. Используйте его, когда вам нужно проанализировать расходы на инфраструктуру, оптимизировать ресурсы или уложиться в бюджетные ограничения.
quantizing-models-bitsandbytes
ДругоеЭтот навык выполняет квантизацию LLM до 8-битной или 4-битной точности с использованием библиотеки bitsandbytes, обеспечивая сокращение использования памяти на 50-75% при минимальной потере точности. Он идеально подходит для запуска больших моделей при ограниченной памяти GPU или для ускорения вывода, поддерживая форматы INT8, NF4 и FP4. Навык интегрируется с HuggingFace Transformers и позволяет использовать обучение QLoRA и 8-битные оптимизаторы.
dispatching-parallel-agents
ДругоеЭтот навык Claude распределяет нескольких агентов для исследования и устранения трёх и более независимых проблем параллельно. Он предназначен для сценариев с несвязанными сбоями, которые можно устранить без общего состояния или зависимостей. Ключевая возможность — параллельное решение проблем, где за каждую независимую предметную область назначается отдельный агент для максимальной эффективности.
