Skip to content
cccskills
FreePublished on GitHub

lsp-guide

Investigate code with the lsp tool, which uses a language server to understand names, imports, and types. Find definitions and usages, inspect signatures and file outlines, and check compiler or type errors after edits.

OriginalShow the original description

Recipes for the lsp tool — resolving where a symbol is defined, every place it is used, type signatures and docs, file outlines, and compiler/type errors through a real language server (Go, TypeScript/JavaScript, Python, Rust). Use when navigating or explaining code by symbol, finding callers or usages, checking what broke after an edit, or deciding between lsp and text search.

See how to install

Good for

  • Finding where a function or variable is defined
  • Tracing symbol usages across imports and aliases
  • Reading type signatures and documentation
  • Inspecting a file’s functions and types
  • Checking errors after editing code

Files included (1)

  • SKILL.md3.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Using the lsp tool

The lsp tool answers semantic questions through the language's own server: it resolves through imports, types, and aliases, where grep only matches text. Reach for it whenever the question is about a symbol; keep grep for plain strings, comments, and file types no server supports.

Operations

OperationAnswersNeeds
definitionwhere the symbol at a position is definedpath, line, column
referencesevery place the symbol at a position is usedpath, line, column
hovertype signature + docs for the symbol at a positionpath, line, column
documentSymbolthe outline (types, functions, methods) of one filepath
diagnosticscompiler/type errors and warnings for one filepath

Positions are 1-based, and column must point at the identifier (its first character works). All paths resolve against the working directory.

Recipes

"Where is X defined?" — from any usage site of X: {"operation": "definition", "path": "<file>", "line": <L>, "column": <C>}. Don't know a usage site? Find one first (see next recipe's step 1).

"Everywhere X is used" — two steps, always:

  1. Locate the declaration: rg -n --column '\bX\b' (the --column output is exactly the coordinate the next call needs), or documentSymbol when you already know the file.
  2. {"operation": "references", "path": "<decl file>", "line": <L>, "column": <C>}.

A grep hit list is not a references answer: it includes comments and strings, misses aliased imports, and can't distinguish same-named symbols. Step 2 is what makes the answer authoritative.

"What is this / what's its signature?" — hover at the symbol. Prefer it over reading the definition file when you only need the type or doc comment.

"What's in this file?" — documentSymbol before reading a large file; jump straight to the line the outline gives you.

"Did my edit break anything here?" — diagnostics on the file after editing. It reports the server's current analysis of the saved file.

Behavior worth knowing

  • First query per workspace is slow (the server indexes — up to a minute in a big repo). Later queries on that workspace are fast; don't give up after one timeout, retry once.
  • References are capped (default 100, header says how many exist).
  • Unsupported file type or missing server returns advice text, not an error — fall back to grep for that file. A missing server can be installed with the user's consent via lsp_enable (see the install-lsps skill for toolchain prerequisites).
  • Works inside dispatch subagents too (they share the parent's warm servers), so symbol lookups are safe to fan out.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Investigate unexpected Claude Code output by matching a session’s local transcript with production router logs. Identify the serving model and trace response conversion code to explain empty blocks, tool output, or other rendering symptoms.

  • Investigate unexpected output in a specific session
  • Examine an empty thinking block
  • Match displayed content to the serving model and provider
weave-os/router5.6KUpdated Oct 19, 2026

Investigate a Codex CLI session by matching its local conversation record with production router logs. Use the session ID to examine missing reasoning summaries, routing markers, unexpected models, or unusual tool calls and trace relevant code paths.

  • Investigate missing reasoning summaries
  • Confirm which model actually served a turn
  • Trace missing or unexpected routing markers
weave-os/router5.6KUpdated Oct 19, 2026

disable-routing

FreeSummary

Switch Codex from Weave Router back to its normal provider for future sessions. Keep the existing login and router configuration, receive the command result, and retain the option to turn routing on again later.

  • Return Codex to its normal provider
  • Disable routing while keeping router configuration
  • Switch providers without logging out
weave-os/router5.6KUpdated Oct 19, 2026

fm

FreeSummary

Pin the current Codex session to a chosen model through Weave Router. This short alias accepts a model ID, runs the included script, and reports the router’s response while allowing the current turn to continue.

  • Pinning a Codex session to a chosen model
  • Using a short alias for force-model
  • Checking the router’s response after pinning a model
weave-os/router5.6KUpdated Oct 19, 2026

force-model

FreeSummary

Pin the current Codex session to a specific model through Weave Router by providing its model ID. The skill applies the pin, continues the same turn, and reports the router's response.

  • Pinning the current Codex session to a model
  • Specifying a model by its ID
  • Applying a model pin while continuing the same turn
weave-os/router5.6KUpdated Oct 19, 2026

install-lsps

FreeSummary

Set up language servers, programs that help tools understand source code, for Go, TypeScript, Python, and Rust. Check missing prerequisites, install them with approval, and verify the lsp tool against a real source file.

  • Enable language support for the lsp tool
  • Install a missing language server
  • Set up prerequisite development tools
weave-os/router5.6KUpdated Oct 19, 2026

See all skills by weave-os

Report a problem with this skill