lsp-code-analysis — Claude Code skill: semantic code navigation via
Semantic code analysis over the Language Server Protocol: jump to definitions, find references, outline a file and preview refactorings.
npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a claude-codeWhat lsp-code-analysis does
The skill hands your agent an lsp CLI for code navigation. Instead of grep and reading whole files, it resolves definitions, references and implementations, tells variables apart from functions and classes, and pulls signatures and docs. On an unfamiliar codebase that beats text search.
Two steps come first: run the update script scripts/update.sh, then confirm the project is supported with lsp server start <project_path>. The skill is not allowed to run without them. You point at a target with --scope (a line number, a range, or a path like MyClass.my_method) and --find, where the <|> marker sets the exact position inside the pattern. Large result sets page through --pagination-id and --start-index.
Commands cover outline for file structure, definition, reference, doc and locate to verify a target before acting. Refactoring has its own guide in references/refactor.md. If the language server for your stack does not come up during the check, nothing else will work — worth testing that before you wire the skill into a workflow.
What it helps with
- find every usage of a function before renaming it
- map an unfamiliar file without reading its implementation
- jump to the definition of a symbol imported from another module
- read a signature and its docs without opening the source
- verify a symbol exists in a file before running a command
Example prompts for the agent
- outline
src/models.pywith lsp outline - find all references to
loggerinsideMyClass.run - jump to the definition of
User.get_idinmodels.py
How to install lsp-code-analysis
1Skills CLI (Vercel)
npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a claude-code2Manually: put the files in place
~/.claude/skills/lsp-code-analysis/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/lsp-code-analysis/
1Skills CLI (Vercel)
npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a codex2Manually: put the files in place
.agents/skills/lsp-code-analysis/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a cursor2Manually: put the files in place
.cursor/skills/lsp-code-analysis/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install lsp-client/lsp-skill lsp-code-analysis2Manually: put the files in place
.github/skills/lsp-code-analysis/SKILL.md1Skills CLI (Vercel)
npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a gemini-cli2Platform CLI
gemini skills install https://github.com/lsp-client/lsp-skill --path skills/lsp-code-analysisManually: put the files in place
.devin/skills/lsp-code-analysis/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about lsp-code-analysis
How do I install lsp-code-analysis in Claude?
Run npx skills add lsp-client/lsp-skill --skill lsp-code-analysis -a claude-code. The skill lands at ~/.claude/skills/lsp-code-analysis/SKILL.md.
What does lsp-code-analysis do?
It gives the agent semantic code navigation over LSP: definitions, references, implementations, symbol search, file outlines and refactoring previews.
What has to happen before first use?
Run scripts/update.sh and verify project support with lsp server start <project_path>. Without those steps the skill cannot be used.