/python-lsp-intelligence:python-lsp-intelligencefrom Python LSP Intelligence
Navigates Python by symbol through basedpyright, resolves imports and aliases before a rename or deletion, and checks code with ruff and basedpyright using the project's own configuration. Use when editing, refactoring or diagnosing Python, fixing a ruff or basedpyright finding, finding every usage of a function, or explaining why an import fails only in the editor.
Ships in Python LSP Intelligence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Work with the language server first and the toolchain second. This skill does not assume that anything checks your edits automatically: run the commands under "Checks" yourself after a change.
LSP owns questions about code structure; Grep owns questions about text. Route each question to its owner, and use both before changing or deleting code.
| Question | Owner | Operation |
|---|---|---|
| Where is X defined? | LSP | goToDefinition |
| Who uses or imports X? | LSP | findReferences |
| Type or signature of X? | LSP | hover |
| What does this file contain? | LSP | documentSymbol, before reading the whole file |
| Where is X, file unknown? | LSP | workspaceSymbol, always with query |
| Who calls X, what does X call? | LSP | prepareCallHierarchy, then incomingCalls / outgoingCalls |
| Implementations of an interface | LSP | goToImplementation |
| Where does a word appear as text (docs, comments, strings, config, scripts)? | Grep | — |
| Is it safe to delete or rename? | Both | LSP for code references, Grep for the blind spots below |
Every operation takes filePath (absolute), line (1-based) and character (1-based, UTF-16 code units: an emoji before the symbol counts 2). Raw LSP data in logs is 0-based: add 1 to both.
When a result is empty, shows only the definition, or will justify an edit or deletion, check all five before believing it:
hover at the same spot shows the intended symbol. "No hover information" means a wrong position or no server, never "no usages".Only after all five does "no references" mean none. Never delete code on LSP evidence alone.
LSP sees static code references only. Grep the name in: strings and reflection (dynamic imports, eval, dispatch by name); entry points and config (package scripts, YAML, JSON, TOML, .env); framework injection (fixtures, decorators, registries, routes); shell scripts, CI, Makefiles, Dockerfiles; docs, comments, templates.
Copy this checklist into your working notes and tick each item:
findReferences on the definition, with the five trust checks. The references are the must-change list.from m import f as g, findReferences on f lists the import line but not the calls to g. Run it on g too, and keep the alias unless the rename includes it.reportMissingImports, cascading reportUnknown*): it can't see the script's uv environment. Check such a script with basedpyright --pythonpath "$(uv python find --script <file>)" <file>.ruff format and ruff check --fix rewrite in place. Re-read a file after running them and before the next edit.findReferences listed.__all__ are strings to the server. Grep tests/, conftest.py, pyproject.toml ([project.scripts], [project.entry-points]) and __all__ lists before calling a name unused.Run them yourself after a change, on every file you touched and every caller:
ruff check --fix <files> then ruff format <files>; ruff rule <CODE> explains a code.basedpyright <files> from the project root, so it reads the project's pyrightconfig.json or pyproject.toml; add --outputjson for machine-readable output.Fix the cause of a finding. Never silence one with # noqa, # type: ignore, cast() or a relaxed rule; narrow untrusted data with a real check instead of casting it. When you can show a finding is a false positive, report it with the evidence and let the project owner decide.
Read toolchain.md when configuring or installing ruff or basedpyright, wiring CI or an IDE, or raising strictness. Read fixtures.md when a check passes code it should flag.
references/fixtures.md (opens in a new tab)references/fixtures/clean_control.py.fixture (opens in a new tab)references/fixtures/references.py.fixture (opens in a new tab)references/fixtures/return_type.py.fixture (opens in a new tab)references/fixtures/undefined_name.py.fixture (opens in a new tab)references/fixtures/unformatted.py.fixture (opens in a new tab)references/toolchain.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nerymurillohnd/the-claude-factory --plugin python-lsp-intelligence