lsp

A code-navigation tool that uses a language server—a program that understands a programming language—to find symbol definitions, uses, documentation, and rename targets across files.

In plain words
What is it for?
Use it to find every reference to a function or type, jump to its definition, view hover documentation, or rename symbols throughout a codebase.
Why use it?
It avoids unreliable text searches when the same name appears in different roles. It requires a configured language server for the project language.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/benmarte/codemunch/lsp
Any agent
npx skills add benmarte/codemunch --skill lsp
Clone the repo
git clone --depth 1 https://github.com/benmarte/codemunch

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 995 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.00995
Opus 5 $0.00024 $0.00498
Sonnet 5 $0.00010 $0.00199
Haiku 4.5 $0.00005 $0.00100

Measured 2d ago against content hash c01366b719f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

lsp scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/codemunch/config.json | jq '.engines'
skills/lsp/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LSP Direct Operations Skill

Use Claude Code's built-in /lsp tool for operations that require semantic understanding of the code — not just text matching.

Pre-flight

# Check LSP config exists for this language
cat .claude/codemunch/config.json | jq '.engines'

# Verify Claude Code LSP tool is available
# Claude Code exposes /lsp for language server operations

If no LSP is configured for the file's language, fall back to ripgrep for references and skip hover/type info.


Operation: Find all references

Find every place a symbol is used across the entire codebase.

/lsp tool call:
  method: textDocument/references
  params: {
    textDocument: { uri: "file:///path/to/file.ts" },
    position: { line: 141, character: 10 },  ← cursor on the symbol name
    context: { includeDeclaration: false }
  }

Format results compactly — do NOT read any of the reference files:

14 references to validateToken:

  src/api/auth.ts:23           → authRouter.post('/login', validateToken, loginHandler)
  src/api/invoices.ts:45       → export const getInvoice = [validateToken, async (req, res) =>
  src/api/invoices.ts:67       → export const createInvoice = [validateToken, async (req, res) =>
  src/middleware/index.ts:12   → app.use('/api', validateToken)
  ...
  tests/auth.test.ts:34        → await validateToken('expired-token')
  tests/auth.test.ts:56        → const result = await validateToken(mockToken)

Tokens used: ~45  (vs reading 14 files: ~42,000 tokens)

Operation: Go to definition

Jump to where a symbol is defined, even if it's in a dependency or different file.

/lsp tool call:
  method: textDocument/definition
  params: {
    textDocument: { uri: "file:///path/to/file.ts" },
    position: { line: 23, character: 15 }
  }

Then use the fetch skill to read only that definition — not the whole file.


Operation: Hover / documentation

Get the type signature and JSDoc/docstring for any symbol.

/lsp tool call:
  method: textDocument/hover
  params: {
    textDocument: { uri: "file:///path/to/file.ts" },
    position: { line: 141, character: 10 }
  }

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 148 lines · 48 tokens per session scan B c01366b719f6

Subscribe to this mod's changes

lsp is a skill published in the GitHub repository benmarte/codemunch (7 stars, last pushed 5mo ago), licensed MIT. It adds 48 tokens to every session and 995 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.