Development

/lsp

Use when needing semantic code navigation - find definitions, references, or callers. Covers LSP, go to definition, find references, hover, code intelligence. NOT for: text pattern searches (use grep), file discovery (use glob).

$ golems-cli skills install lsp
Experimental

Updated 2 weeks ago

Use this skill when you need guidance on using Claude Code's LSP (Language Server Protocol) tools for code navigation and understanding.

Quick Reference

OperationUse CaseExample
goToDefinitionFind where a symbol is definedJump to function implementation
findReferencesFind all usages of a symbolBefore renaming a function
hoverGet type info and docsQuick understanding of a type
documentSymbolList symbols in a fileUnderstanding file structure
workspaceSymbolSearch symbols globallyFinding a class by name
goToImplementationFind interface implementationsWorking with abstract types
incomingCallsFind callers of a functionImpact analysis
outgoingCallsFind callees of a functionUnderstanding dependencies

Prerequisites

LSP must be configured for the language. Check:

  1. Are LSP plugins installed via /plugin command?
  2. Is the language server binary installed?

Common Workflows

Safe Symbol Rename

1. Position cursor on symbol name
2. Use findReferences to locate ALL usages
3. Review each reference
4. Make the rename changes
5. Run typecheck to verify

Understanding Unfamiliar Code

1. Use goToDefinition on the entry point
2. Use hover on types you don't recognize
3. Use outgoingCalls to understand dependencies
4. Use incomingCalls to understand how it's used

Impact Analysis Before Changes

1. Use findReferences on the function you're modifying
2. Use incomingCalls to see the call chain
3. Assess which callers might be affected
4. Plan your changes accordingly

Tracing a Bug

1. Start at the error location
2. Use goToDefinition to trace back through the call stack
3. Use findReferences on suspicious variables
4. Identify where incorrect values originate