Skip to main content
skill CX Codex

lsp-implement — Claude Code skill for finding implementations

Find concrete types that implement an interface or extend an abstract type. Run it before changing a base type to see which implementations the change may affect.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a claude-code
Open on GitHub

What lsp-implement does

The skill locates a type definition, then gathers implementation sites and builds a view of its subtypes and supertypes. It reports the types along with their file locations. It does not edit files.

The agent-lsp MCP server is required. The skill checks language-server capabilities first, since implementation lookup and type hierarchy support vary by server. If neither feature is available, it stops. That means the results depend on what the language server can provide. Give it a type name; workspace_root is optional.

What it helps with

  • find concrete types that satisfy an interface
  • list implementation sites to update after adding a method
  • inspect subtypes before changing a base type
  • map a type hierarchy in an unfamiliar codebase

Example prompts for the agent

  • Find every implementation of the Handler interface in this project.
  • Before adding a method to io.Reader, list the types that need changes.
  • Show the subtypes of BaseHandler and report their file locations.

How to install lsp-implement

1Skills CLI (Vercel)

npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a claude-code

2Manually: put the files in place

~/.claude/skills/lsp-implement/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/lsp-implement/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about lsp-implement

How do I install lsp-implement in Claude Code?

Run npx skills add blackwell-systems/agent-lsp --skill lsp-implement -a claude-code. The skill file is placed at ~/.claude/skills/lsp-implement/SKILL.md.

What does lsp-implement do?

It finds types that implement an interface or derive from an abstract type, then reports them with file locations. The skill is read-only.

What does lsp-implement need to run?

It requires the agent-lsp MCP server. Implementation lookup and type hierarchy results depend on the language server's supported features.

Source text

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

Similar skills

SKILL.md skills catalog →

From the same set25

lsp-refactor Runs a guarded refactoring pipeline with blast-radius checks, in-memory edit previews, disk application, build verification, and targeted tests. CX Codex +1 ★ 165repo stars lsp-onboard lsp-onboard maps a new codebase through LSP and gives the agent a project profile with its build, tests, entry points, and structure. CX Codex +1 ★ 165repo stars lsp-local-symbols Lists the functions and types a file declares, finds every use of a symbol inside it, and reports the type. Handy before you edit a single file. CX Codex +1 ★ 165repo stars lsp-inspect Runs a deep code quality audit on files or directories using LSP data. Flags dead symbols, swallowed errors, and concurrency flaws before release. CX Codex +1 ★ 165repo stars lsp-impact Maps every caller, supertype and subtype, and reference count for a symbol or file before you touch it. Built for refactors and deletions. CX Codex +1 ★ 165repo stars lsp-generate Triggers language server code generation for interface stubs, test skeletons, and missing methods. Useful when scaffolding new types or missing symbols. CX Codex +1 ★ 165repo stars lsp-format-code Formats an entire source file or a selected line range through a language server. Use it to tidy generated code or apply the project's formatting rules before a commit. CX Codex +1 ★ 165repo stars lsp-fix-all Walks every diagnostic in a file and applies the quick-fixes your language server offers. Handy when errors and warnings have piled up before you start new work. CX Codex +1 ★ 165repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor