本文へ移動
cccskills
無料GitHub で公開

lsp-guide

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Investigate a specific Claude Code session by session ID — correlate the local transcript (`~/.claude/projects/...jsonl`) with the router's production logs to understand what the client rendered vs. what the upstream served. Use when given a session ID and asked "why did X render?" for a Claude Code conversation routed through the router.

日本語の概要は準備中です。原文の説明を表示しています。

weave-os/router5,5872026年10月11日 更新

Investigate a specific Codex CLI session by session ID — correlate the local rollout transcript (`~/.codex/sessions/YYYY/MM/DD/rollout-*-<SESSION_ID>.jsonl`) with the router's production logs to understand what Codex rendered vs. what the upstream served on the /v1/responses path. Use when given a session ID and asked "why did X render?" (missing thinking, missing routing marker, wrong model, tool-call weirdness) for a Codex conversation routed through the router.

日本語の概要は準備中です。原文の説明を表示しています。

weave-os/router5,5872026年10月11日 更新

Switch Codex back to its normal provider for future sessions.

日本語の概要は準備中です。原文の説明を表示しています。

weave-os/router5,5872026年10月11日 更新

fm

無料

Alias for force-model — pin this Codex session to a specific model through the Weave Router.

日本語の概要は準備中です。原文の説明を表示しています。

weave-os/router5,5872026年10月11日 更新

Pin this Codex session to a specific model through the Weave Router.

日本語の概要は準備中です。原文の説明を表示しています。

weave-os/router5,5872026年10月11日 更新

Install language servers (gopls, typescript-language-server, pyright, rust-analyzer) and their prerequisite toolchains (Go, Node/npm, rustup) so the lsp tool works. Use when the user asks to enable or install LSP / language-server support, when lsp_enable reports a missing toolchain, or when the lsp tool reports no language server is installed.

日本語の概要は準備中です。原文の説明を表示しています。

weave-os/router5,5872026年10月11日 更新

weave-os のスキルをすべて見る

このスキルの問題を報告する