lsp-implement
关于
This skill finds all concrete implementations of an interface or abstract type using LSP capabilities, helping developers understand type hierarchies before making changes. It's read-only and requires the agent-lsp MCP server with implementationProvider support. Use it when modifying interface signatures or base types to see all affected subtypes.
快速安装
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-implement在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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.
GitHub 仓库
相关推荐技能
llamaguard
其他LlamaGuard是Meta推出的7-8B参数内容审核模型,专门用于过滤LLM的输入和输出内容。它能检测六大安全风险类别(暴力/仇恨、性内容、武器、违禁品、自残、犯罪计划),准确率达94-95%。开发者可通过HuggingFace、vLLM或Sagemaker快速部署,并能与NeMo Guardrails集成实现自动化安全防护。
cost-optimization
其他这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。
quantizing-models-bitsandbytes
其他这个Skill使用bitsandbytes库量化大语言模型,能在GPU内存有限时通过8位或4位量化减少50-75%内存占用,同时保持精度损失最小。它支持INT8、NF4、FP4等多种量化格式,可与HuggingFace Transformers无缝集成,适用于需要部署更大模型或加速推理的场景。还提供QLoRA训练和8位优化器支持,让开发者能轻松实现高效模型压缩。
dispatching-parallel-agents
其他该Skill用于并行处理3个以上无依赖关系的独立故障,可为每个问题域分派专属Claude代理同时执行调查修复。它通过并发处理多个独立问题显著提升故障排查效率,特别适用于测试文件、子系统等无共享状态的场景。
