lsp-enable
БесплатноБез исполняемых скриптовНе проверенUse when navigating code, understanding unfamiliar functions, finding definitions or references, tracing call hierarchies, preparing for refactoring, or…
Об этом скилле
LSP-First Code Intelligence
The Iron Laws
1. NO MODIFYING UNFAMILIAR CODE WITHOUT goToDefinition FIRST
2. NO REFACTORING WITHOUT findReferences IMPACT ANALYSIS FIRST
3. NO CLAIMING CODE WORKS WITHOUT LSP DIAGNOSTICS VERIFICATION
Violating these laws wastes tokens, introduces bugs, and produces incomplete changes.
Trigger Phrases
Activate when user says:
- "find definition", "go to definition", "where is X defined"
- "find references", "who uses this", "what calls this function"
- "understand this code", "trace this function", "explore codebase"
- "before I refactor", "impact of changing", "safe to rename"
- "analyze dependencies", "call hierarchy", "incoming calls"
- "check this code", "verify implementation", "LSP diagnostics"
Core Decision Tree
WHAT DO YOU NEED?
│
├─ Symbol definition or implementation
│ └─ USE LSP: goToDefinition, goToImplementation
│
├─ All usages of a symbol
│ └─ USE LSP: findReferences
│
├─ Type info, docs, or signatures
│ └─ USE LSP: hover
│
├─ File structure or symbol list
│ └─ USE LSP: documentSymbol
│
├─ Call graph or dependencies
│ └─ USE LSP: incomingCalls, outgoingCalls
│
├─ Symbol search across workspace
│ └─ USE LSP: workspaceSymbol
│
├─ Literal text search (TODOs, strings, config)
│ └─ USE: Grep (LSP doesn't do text matching)
│
└─ File discovery by pattern
└─ USE: Glob
The Nine LSP Operations
| Operation | Purpose | Use Before |
|---|---|---|
goToDefinition |
Jump to where symbol is defined | Modifying unfamiliar code |
findReferences |
Find all usages of a symbol | Refactoring, renaming |
goToImplementation |
Find interface implementations | Working with polymorphism |
hover |
Get type info, docs, signatures | Understanding APIs |
documentSymbol |
List all symbols in a file | Understanding large files |
workspaceSymbol |
Search symbols across codebase | Finding related code |
prepareCallHierarchy |
Get call hierarchy info | Analyzing call graphs |
incomingCalls |
Find callers of a function | Impact analysis |
outgoingCalls |
Find functions called by target | Dependency tracing |
Required parameters for all operations:
filePath- Absolute path to fileline- Line number (1-based)character- Column position (1-based)
Full operation guide: references/lsp-operations-guide.md
Pre-Edit Protocol (Mandatory)
Before modifying ANY unfamiliar code:
1. NAVIGATE: LSP goToDefinition → understand implementation
2. ANALYZE: LSP findReferences → assess change impact
3. INSPECT: LSP hover → verify type signatures
4. THEN: Make changes
Pre-Edit Checklist:
- Used goToDefinition to understand implementation
- Used findReferences to identify all usages
- Reviewed type signatures via hover
- Understand interface/trait contracts
- Know what breaks if this changes
Skip any step = incomplete understanding = bugs
Post-Edit Verification (Mandatory)
After code changes:
1. CHECK: LSP diagnostics for errors/warnings
2. VERIFY: No new type errors introduced
3. CONFIRM: Imports resolve correctly
4. VALIDATE: Interface contracts still satisfied
Do NOT claim code works without LSP diagnostics verification.
LSP Availability Check
Before LSP operations, verify setup:
# Environment variable must be set
echo $ENABLE_LSP_TOOL # Should output "1"
# If not set, add to shell profile:
export ENABLE_LSP_TOOL=1
If LSP unavailable:
- Warn user: "LSP not available. Semantic operations will be less accurate."
- Suggest fix: "Set
ENABLE_LSP_TOOL=1in your shell profile" - Fall back: Use Grep/Read with documented limitation
- Note limitation: "Used grep fallback - may include false positives"
Full setup guide: references/lsp-setup-verification.md
Server Installation
If LSP servers are not installed, use /lsp-tools:lsp-setup for guided installation.
Quick verification:
# Run verification script
bash "${CLAUDE_PLUGIN_DIR}/scripts/bash/verify-lsp-servers.sh"
Per-language installation scripts are available:
| Language | Server | Install Script |
|---|---|---|
| TypeScript/JS | vtsls | scripts/bash/install-typescript-lsp.sh |
| Python | pyright | scripts/bash/install-python-lsp.sh |
| Rust | rust-analyzer | scripts/bash/install-rust-lsp.sh |
| Go | gopls | scripts/bash/install-go-lsp.sh |
| Java | jdtls | scripts/bash/install-java-lsp.sh |
| Kotlin | kotlin-language-server | scripts/bash/install-kotlin-lsp.sh |
| C/C++ | clangd | scripts/bash/install-cpp-lsp.sh |
| C# | OmniSharp | scripts/bash/install-csharp-lsp.sh |
| PHP | phpactor | scripts/bash/install-php-lsp.sh |
| Ruby | ruby-lsp | `script |
Установить lsp-enable в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lsp-enable?
Use when navigating code, understanding unfamiliar functions, finding definitions or references, tracing call hierarchies, preparing for refactoring, or analyzing code impact. Enforces LSP-first semantic code intelligence with mandatory pre-edit checks, impact analysis before refactoring, and post-edit diagnostics. Provides IDE-like precision for code operations in large codebases. Covers navigation (goToDefinition, findReferences), understanding (hover, documentSymbol), and call analysis (incomingCalls, outgoingCalls).
Как установить скилл lsp-enable?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lsp-enable запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic