/bee:lsp-analysisfrom bee
Uses LSP tools for precise dependency analysis, including call hierarchies, reference counting, and coupling quantification. Falls back to grep when LSP unavailable.
Ships in bee. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Claude Code provides built-in LSP (Language Server Protocol) tools that give you semantic code understanding — actual dependency graphs instead of text pattern matching. When LSP is available, use it. When it's not, fall back to grep/glob silently.
This skill applies to any agent that performs code analysis — coupling, test coverage, architecture boundaries, migration scoping, or structural understanding.
| Operation | What it does | Use it for |
|---|---|---|
find-references | Find all usages of a symbol across the workspace | Dependency mapping, counting consumers of exports, detecting cross-boundary calls |
call-hierarchy (incoming) | Find all functions that call the target function | Afferent coupling — who depends on this? Blast radius of a change |
call-hierarchy (outgoing) | Find all functions the target function calls | Efferent coupling — what does this depend on? Transitive dependency depth |
go-to-definition | Jump to where a symbol is defined | Resolving what an imported symbol actually is, following re-exports |
hover | Get type information and documentation for a symbol | Type info for complexity assessment, understanding interfaces without reading source |
document-symbols | List all symbols in a file (functions, classes, interfaces) | Module structure overview, listing exports, quick structural scan |
workspace-symbols | Search for symbols by name across the entire workspace | Finding types, interfaces, or classes by name across the codebase |
LSP responses are graph edges, not search results. Each find-references call returns edges in a dependency graph. Each call-hierarchy call returns paths through that graph. Build the graph, then reason over it.
Transitivity. Don't stop at direct callers or callees. Use call-hierarchy to follow chains. If A calls B and B calls C, then A depends on C. Grep only shows you A→B and B→C as separate matches — LSP gives you the chain directly.
Completeness. find-references returns ALL usages, not a sample. Count them. "3 callers" vs "47 callers" is the difference between loosely coupled and tightly coupled. Grep misses re-exports, aliased imports, inherited methods, and framework-injected references.
Quantify coupling with fan-in and fan-out.
Blast radius = incomingCalls depth. How far does a change propagate through the call graph? A function with 3 direct callers might have 50 transitive dependents.
Testability = outgoingCalls depth. How many things must be mocked or stubbed to test this in isolation? A function with 1 import but 15 transitive outgoing calls is not a low-hanging fruit for unit testing.
Why this matters more than grep. Grep finds text matches. LSP finds semantic connections. Grep misses:
When you have LSP data, reason over the graph structure. When you don't, acknowledge that grep-based analysis is an approximation.
Check LSP availability once at the start of your analysis, not per-operation.
document-symbols on one of the target files.Decide once. Don't retry LSP after it fails — repeated failures waste time and add noise. Set a flag and move on.
When LSP is not available:
find-references for dependency mapping, the fallback is Grep for import/require patterns. If it used call-hierarchy for coupling depth, the fallback is reading files and tracing calls manually.Include one of these phrases in your analysis output so the developer knows the confidence level:
Place this near the top of the output, before the findings. This is a single line — not a paragraph, not a disclaimer.
| Language | LSP Server |
|---|---|
| TypeScript / JavaScript | typescript-language-server |
| Java | jdtls (Eclipse JDT Language Server) |
| Go | gopls |
| Python | pyright |
| Rust | rust-analyzer |
| C / C++ | clangd |
| Ruby | solargraph |
| C# | omnisharp |
| Kotlin | kotlin-language-server |
| PHP | intelephense |
| Swift | sourcekit-lsp |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub incubyte/ai-plugins --plugin bee21 skills in this plugin
/ai-ergonomicsThis skill should be used when evaluating how well code supports LLM-assisted development. Contains context window friendliness, explicitness, module boundaries, test-as-spec, and naming criteria./ai-workflowThis skill should be used when explaining why Bee follows spec-first TDD workflows, or when teaching mode is on. Contains the reasoning behind spec → plan → test → code ordering./architecture-patternsThis skill should be used when evaluating architecture options, checking dependency direction, or deciding between onion, MVC, and simple patterns. Contains YAGNI-based decision criteria./bee-stateThis skill should be used when updating workflow state in bee-state.local.md. Contains the full command reference for update-bee-state.sh including init, set, get, clear, all flags, and multi-line field syntax./boundary-generationThis skill should be used after discovery completes on a greenfield project when the discovery document contains a Module Structure section. Contains the full procedure for parsing module boundaries, generating BOUNDARIES.md, and optionally linking it from CLAUDE.md./brainstormingThis skill should be used when the user wants to brainstorm, explore ideas, think through options, says 'let's brainstorm', 'what are our options', 'how might we', 'what if we', 'help me think through', 'explore approaches', or presents an open-ended problem without a clear solution. Covers cross-domain thinking where changing one dimension (product, tech, UX) can simplify another.Other plugins' skills for the same job