detect-lsp

A setup task that finds available Language Server Protocol tools, which help understand code structure, and configures codemunch to use them.

In plain words
What is it for?
Use it when setting up codemunch in a project so it can detect the languages present and connect available language servers.
Why use it?
It gives codemunch a precise way to locate functions, classes, and other code symbols when suitable language tools are installed.

Skill for Claude CodeCodex

Part of the codemunch plugin — 8 skills, 10 commands, 2 hooks shipped together

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/detect-lsp
Any agent
npx skills add benmarte/codemunch --skill detect-lsp
Clone the repo
git clone --depth 1 https://github.com/benmarte/codemunch

Made for: Claude Code, Codex.

Or install codemunch, the plugin that ships this one along with the rest of its 8 skills, 10 commands, 2 hooks.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00050 $0.01746
Opus 5 $0.00025 $0.00873
Sonnet 5 $0.00010 $0.00349
Haiku 4.5 $0.00005 $0.00175

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

Security

Grade A, and why

detect-lsp scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/detect-lsp/SKILL.md · 178 lines

How it starts

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

LSP Detection Skill

Detect available language servers and configure codemunch to use them for precise symbol extraction.

Step 1 — Detect project languages

# Identify languages present in the project
find . -maxdepth 4 \( \
  -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \
  -o -name "*.py" \
  -o -name "*.go" \
  -o -name "*.rs" \
  -o -name "*.rb" \
  -o -name "*.java" -o -name "*.kt" \
  -o -name "*.cs" \
  -o -name "*.cpp" -o -name "*.c" -o -name "*.h" \
  -o -name "*.php" \
  -o -name "*.swift" \
  -o -name "*.lua" \
  -o -name "*.zig" \
  -o -name "*.ex" -o -name "*.exs" \
  -o -name "*.hs" \
  -o -name "*.ml" -o -name "*.mli" \
\) -not -path "*/node_modules/*" -not -path "*/.git/*" \
  -not -path "*/target/*" -not -path "*/__pycache__/*" \
  2>/dev/null | \
  sed 's/.*\.//' | sort | uniq -c | sort -rn | head -20

Step 2 — Check for installed language servers

For each detected language, check if a server is installed:

# TypeScript / JavaScript
which typescript-language-server 2>/dev/null && echo "LSP:typescript=typescript-language-server --stdio"
which tsserver 2>/dev/null && echo "LSP:typescript-alt=tsserver"
# Check via npx as fallback
npx --yes typescript-language-server --version 2>/dev/null && echo "LSP:typescript-npx=npx typescript-language-server --stdio"

# Python
which pylsp 2>/dev/null && echo "LSP:python=pylsp"
which pyright-langserver 2>/dev/null && echo "LSP:python=pyright-langserver --stdio"
which pyright 2>/dev/null && echo "LSP:python-alt=pyright --stdio"
which jedi-language-server 2>/dev/null && echo "LSP:python-alt2=jedi-language-server"

# Go
which gopls 2>/dev/null && echo "LSP:go=gopls"

# Rust
which rust-analyzer 2>/dev/null && echo "LSP:rust=rust-analyzer"

# Ruby
which solargraph 2>/dev/null && echo "LSP:ruby=solargraph stdio"
which ruby-lsp 2>/dev/null && echo "LSP:ruby-alt=ruby-lsp"

# Java
which jdtls 2>/dev/null && echo "LSP:java=jdtls"
which java-language-server 2>/dev/null && echo "LSP:java-alt=java-language-server"

# Kotlin
which kotlin-language-server 2>/dev/null && echo "LSP:kotlin=kotlin-language-server"

# C / C++
which clangd 2>/dev/null && echo "LSP:c=clangd"
which ccls 2>/dev/null && echo "LSP:c-alt=ccls"

# C#
which omnisharp 2>/dev/null && echo "LSP:csharp=omnisharp -lsp"
which csharp-ls 2>/dev/null && echo "LSP:csharp-alt=csharp-ls"

# PHP
which phpactor 2>/dev/null && echo "LSP:php=phpactor language-server"
which intelephense 2>/dev/null && echo "LSP:php-alt=intelephense --stdio"

# Swift
which sourcekit-lsp 2>/dev/null && echo "LSP:swift=sourcekit-lsp"

# Lua
which lua-language-server 2>/dev/null && echo "LSP:lua=lua-language-server"

# Zig
which zls 2>/dev/null && echo "LSP:zig=zls"

# Elixir
which elixir-ls 2>/dev/null && echo "LSP:elixir=elixir-ls"
which lexical 2>/dev/null && echo "LSP:elixir-alt=lexical"

# Haskell
which haskell-language-server 2>/dev/null && echo "LSP:haskell=haskell-language-server-wrapper --lsp"
which haskell-language-server-wrapper 2>/dev/null && echo "LSP:haskell=haskell-language-server-wrapper --lsp"

# OCaml
which ocamllsp 2>/dev/null && echo "LSP:ocaml=ocamllsp"

# Bash / Shell
which bash-language-server 2>/dev/null && echo "LSP:bash=bash-language-server start"

# YAML
which yaml-language-server 2>/dev/null && echo "LSP:yaml=yaml-language-server --stdio"

# JSON
which vscode-json-language-server 2>/dev/null && echo "LSP:json=vscode-json-language-server --stdio"

# CSS / HTML
which vscode-css-language-server 2>/dev/null && echo "LSP:css=vscode-css-language-server --stdio"
which vscode-html-language-server 2>/dev/null && echo "LSP:html=vscode-html-language-server --stdio"

Read the full file on GitHub · 178 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. 3d ago First seen · 178 lines · 50 tokens per session scan A ab2452fb6a58

Subscribe to this mod's changes

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