lsp-implement — скилл для Claude Code: поиск реализаций
Скилл находит типы, реализующие интерфейс, и подтипы абстрактного типа. Запустите его перед изменением интерфейса, чтобы увидеть, какие реализации затронет правка.
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a claude-codeЧто делает lsp-implement
Скилл ищет объявление типа, затем собирает места, где его реализуют, и строит иерархию подтипов и суперклассов. Результаты оформляет в отчёт с файлами, строками и списком найденных типов. Файлы он не меняет.
Для работы нужен MCP-сервер agent-lsp. Скилл сначала проверяет возможности языкового сервера: поиск реализаций и иерархия типов поддерживаются не всеми серверами. Если не доступна ни одна из этих функций, поиск останавливается; значит, результат зависит от возможностей сервера. Можно передать имя типа и при необходимости workspace_root.
Какие задачи решает
- найти все типы, реализующие интерфейс
- составить список мест для обновления после добавления метода
- проверить подтипы перед изменением базового типа
- разобраться в иерархии типов незнакомого проекта
Примеры запросов агенту
- Найди все реализации интерфейса
Handlerв проекте. - Перед добавлением метода в
io.Readerперечисли типы, которые нужно изменить. - Покажи подтипы
BaseHandlerи оформи результат отчётом.
Как установить lsp-implement
1Через Skills CLI (Vercel)
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a claude-code2Вручную: положить файлы
~/.claude/skills/lsp-implement/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/lsp-implement/
1Через Skills CLI (Vercel)
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a codex2Вручную: положить файлы
.agents/skills/lsp-implement/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a cursor2Вручную: положить файлы
.cursor/skills/lsp-implement/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install blackwell-systems/agent-lsp lsp-implement2Вручную: положить файлы
.github/skills/lsp-implement/SKILL.md1Через Skills CLI (Vercel)
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a gemini-cli2Командой платформы
gemini skills install https://github.com/blackwell-systems/agent-lsp --path skills/lsp-implementВручную: положить файлы
.devin/skills/lsp-implement/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о lsp-implement
Как установить lsp-implement в Claude Code?
Выполните npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a claude-code. Файл скилла появится по пути ~/.claude/skills/lsp-implement/SKILL.md.
Что делает lsp-implement?
Находит реализации интерфейса или подтипы абстрактного типа и перечисляет их в отчёте с расположением в файлах. Скилл работает только на чтение.
Что нужно для работы lsp-implement?
Нужен MCP-сервер agent-lsp. Поиск реализаций и иерархии типов зависит от того, поддерживает ли эти функции языковой сервер.
Исходный текст
SKILL.md · MIT
---
name: lsp-implement
description: Find all concrete implementations of an interface or abstract type. Use when you need to know what types satisfy an interface, or what subtypes exist before changing a base type.
argument-hint: "[interface-or-type-name]"
user-invocable: true
allowed-tools: mcp__lsp__start_lsp mcp__lsp__get_server_capabilities mcp__lsp__go_to_symbol mcp__lsp__go_to_implementation mcp__lsp__type_hierarchy mcp__lsp__open_document
license: MIT
compatibility: Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
metadata:
required-capabilities: implementationProvider
optional-capabilities: typeHierarchyProvider workspaceSymbolProvider
---
> Requires the agent-lsp MCP server.
# lsp-implement
Find every concrete type that implements an interface, or every subtype of an
abstract type. Read-only — does not modify any files.
Use this skill **before** changing an interface signature, adding a method to
an interface, or removing a base-type method. It tells you every type that
must be updated.
**Invocation:** User provides `type_name` (e.g. `"Handler"`, `"io.Reader"`).
Optionally provide `workspace_root`.
---
## Prerequisites
Check server capabilities — `go_to_implementation` and `type_hierarchy` are
optional features not implemented by all language servers:
```
mcp__lsp__get_server_capabilities()
```
Note which of `go_to_implementation` and `type_hierarchy` appear in
`supported_tools`. The steps below depend on this result.
If neither is supported, report `"Server does not support implementation
lookup"` and stop.
---
## Step 1 — Locate the interface or type
```
mcp__lsp__go_to_symbol({
"symbol_path": "<TypeName>",
"workspace_root": "/abs/path" // optional
})
→ returns: file, line, column (1-indexed)
```
Open the file so the language server tracks it:
```
mcp__lsp__open_document({
"file_path": "<file from go_to_symbol>"
})
```
Record `file`, `line`, `column` for subsequent steps.
---
## Step 2 — Find all implementations
Only if `go_to_implementation` appears in `supported_tools`.
```
mcp__lsp__go_to_implementation({
"file_path": "<file>",
"line": <line>,
"column": <column>
})
```
Returns a list of locations — each is a concrete type that satisfies the
interface. Group by file. Record type names and locations.
If `go_to_implementation` is **not** supported: skip; note in report.
---
## Step 3 — Type hierarchy (subtypes and supertypes)
Only if `type_hierarchy` appears in `supported_tools`.
```
mcp__lsp__type_hierarchy({
"file_path": "<file>",
"line": <line>,
"column": <column>,
"direction": "subtypes" // use "both" to also see what this type extends
})
```
`subtypes` returns concrete types that extend or embed this type.
`supertypes` returns what this type itself implements.
Cross-reference with Step 2 results — the union gives the complete
implementation surface.
If `type_hierarchy` is **not** supported: skip; note in report.
---
## Step 4 — Report
```
## Implementation Report: <TypeName>
### Definition
- File: <file>:<line>
- Kind: interface / abstract type / base struct
### Concrete Implementations (<N> found)
- TypeA — <file>:<line>
- TypeB — <file>:<line>
...
### Type Hierarchy
Supertypes: [list or "none"]
Subtypes: [list or "same as implementations above" or "not supported"]
### Risk Assessment
| N implementations | Recommendation |
|---|---|
| 0 | Interface unused or no external implementors found. May be internal-only. |
| 1–3 | Low risk. All implementors can be updated together. |
| 4–10 | Medium risk. Plan updates package by package. |
| > 10 | High risk. Changing the interface is a breaking API change. |
```
---
## Common use cases
**Before adding a method to an interface:**
Run lsp-implement to find all types that will need the new method. Each
implementation site must be updated — this is your required change list.
**Before removing a method:**
Find all types that implement it. Check whether any external (outside this
repo) packages may be affected.
**Understanding polymorphism in an unfamiliar codebase:**
Run lsp-implement on the primary interface to see the full type hierarchy
before making any changes.
---
## Language notes
| Language | `go_to_implementation` finds... |
|---|---|
| Go | All types with matching method sets |
| TypeScript | All classes implementing the interface |
| Java/C# | All classes/structs implementing the interface |
| Rust | All structs with `impl Trait for ...` |
For Go: `go_to_implementation` on an interface finds all types that satisfy
it, even without an explicit `implements` declaration.
© blackwell-systems · MIT · blackwell-systems/agent-lsp