using-lsp-tools

using-lsp-tools is a skill for Claude Code, Codex from axiomantic/spellbook. It costs 81 tokens per session (1,152 once invoked), scanned A, original, MIT.

A guide for using language-server tools, which provide code-aware information such as symbol definitions, references, types, and diagnostics. It explains when semantic code navigation is better than text search.

In plain words
What is it for?
Use it to find definitions and references, inspect types, rename symbols safely, navigate code, and review language-server diagnostics.
Why use it?
It helps avoid missed references and imprecise edits when working with symbols that appear in many files or have language-specific meaning.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find definitions and references, inspect types, rename symbols safely, navigate code, and review language-server diagnostics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/axiomantic/spellbook/using-lsp-tools
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.

Any agent
npx skills add axiomantic/spellbook --skill using-lsp-tools
Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for using-lsp-tools

README.md
[![agentmods](https://agentmods.dev/badge/skills/axiomantic/spellbook/using-lsp-tools/github.svg)](https://agentmods.dev/skills/axiomantic/spellbook/using-lsp-tools)
Your own site
<a href="https://agentmods.dev/skills/axiomantic/spellbook/using-lsp-tools"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/using-lsp-tools/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for using-lsp-tools

Your own site · 80×15
<a href="https://agentmods.dev/skills/axiomantic/spellbook/using-lsp-tools"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/using-lsp-tools.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,152 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00081 $0.01152
Opus 5.5 $0.00032 $0.00461
Sonnet 5.5 $0.00016 $0.00230
Haiku 4.5 $0.00008 $0.00115

Measured 1mo ago against content hash 761e585ed244, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-lsp-tools 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 1mo 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/using-lsp-tools/SKILL.md · 125 lines

How it starts

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

Using LSP Tools

Invariant Principles

  1. Semantic > Lexical: LSP understands scope, types, inheritance. Grep sees text.
  2. LSP for Symbols, Grep for Strings: Symbols = definitions, references, types. Strings = TODOs, comments, literals.
  3. Verify Before Fallback: Empty LSP result? Check file saved. Then try text-based.
  4. Atomic Operations Preferred: rename_symbol handles all files. Manual Edit misses references.

Reasoning Schema

Inputs

Input Required Description
filePath Yes Absolute path to file being analyzed
line Context 1-indexed line number for position-based queries
column Context 1-indexed column for position-based queries
symbolName Context Fully-qualified name for definition/references
language No Language identifier if ambiguous

Outputs

Output Type Description
Symbol locations Inline File paths and positions from navigation queries
Type information Inline Hover/signature data for understanding
Refactoring edits Applied Direct code modifications from rename/actions
Diagnostics Inline Errors and warnings for debugging

Tool Priority Matrix

Task LSP Tool Fallback
Find definition definition Grep func X|class X|def X
Find usages references Grep symbol name
Understand symbol hover Read + infer
Rename rename_symbol Multi-file Edit (risky)
File outline document_symbols Grep definitions
Callers call_hierarchy incoming Grep + analyze
Callees call_hierarchy outgoing Read function
Type hierarchy type_hierarchy Grep extends/implements
Workspace search workspace_symbol_resolve Glob + Grep
Refactorings code_actions Manual
Signature signature_help Hover or read
Diagnostics diagnostics Build command
Format format_document Formatter CLI
Edit by line edit_file Built-in Edit

Read the full file on GitHub · 125 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. 1mo ago First seen · 125 lines · 81 tokens per session scan A 761e585ed244

Subscribe to this mod's changes

using-lsp-tools is a skill published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 2d ago), licensed MIT. It adds 81 tokens to every session and 1,152 once invoked, about $0.0003 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

codegraph

Analyze indexed codebases via graph database (neug) and vector index (zvec). Covers call graphs, dependencies, dead code, hotspots, module coupling, architecture reports, semantic search, impact analysis, bug root cause from GitHub issues, class diagrams (UML), and PR review (risk scoring, conflict detection…

QwenLM/qwen-code · 0 tokens

stuck

Diagnose frozen, stuck, or slow Qwen Code sessions on this machine. Scans for problematic processes, high CPU/memory usage, hung subprocesses, and debug logs. Use /stuck or /stuck to focus on a specific process.

QwenLM/qwen-code · 57 tokens

structured-debugging

Hypothesis-driven debugging methodology for hard bugs. Use this skill whenever you're investigating non-trivial bugs, unexpected behavior, flaky tests, or tracing issues through complex systems. Activate proactively when debugging requires more than a quick glance — especially when the first attempt at a fix didn't…

QwenLM/qwen-code · 85 tokens

memory-leak-debug

Diagnose memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Use when investigating high memory usage, unbounded growth, or suspected object retention issues.

QwenLM/qwen-code · 42 tokens

bugfix

Fix a bug from a GitHub issue, following the reproduce-first workflow. Use when the user asks to fix a bug, investigate a GitHub issue, or debug a user-reported problem. Takes a GitHub issue URL or number as input.

QwenLM/qwen-code · 53 tokens

test-failure-explorer

Import and query an existing Vitest 3.2 JSON report to explore test failures, file-level errors and original diagnostic evidence.

QwenLM/qwen-code · 32 tokens