python-lsp
/python-lsp
Use this skill whenever Claude needs semantic intelligence on Python source — type errors, import resolution, go-to-definition, find-references, or hover type information. Trigger on: "Python LSP", "pyright", "type error", "find references", "who calls this function", "where is X defined", "why does this import fail", ".py diagnostics", "missing type stub", "pyrightconfig", "type checking mode", "reportMissingImports", or any question about .py/.pyi files that requires real symbol resolution rather than textual search.
- Author
- msapps-mobile ↗
- Repository
- claude-plugins ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use this skill whenever Claude needs semantic intelligence on Python source — type errors, import resolution, go-to-definition, find-references, or hover type information. Trigger on: "Python LSP", "pyright", "type error", "find references", "who calls this function", "where is X defined", "why does this import fail", ".py diagnostics", "missing type stub", "pyrightconfig", "type checking mode", "reportMissingImports", or any question about .py/.pyi files that requires real symbol resolution rather than textual search.
Triggers from the description
Original author description
Use this skill whenever Claude needs semantic intelligence on Python source — type errors, import resolution, go-to-definition, find-references, or hover type information. Trigger on: "Python LSP", "pyright", "type error", "find references", "who calls this function", "where is X defined", "why does this import fail", ".py diagnostics", "missing type stub", "pyrightconfig", "type checking mode", "reportMissingImports", or any question about .py/.pyi files that requires real symbol resolution rather than textual search.
How it works
- Workflow Process
- Pyright startup notes
- Example pyrightconfig.json
- Common Issues (FAQ)
- Out of scope
SKILL.md preview
---
name: python-lsp
description: |
Use this skill whenever Claude needs semantic intelligence on Python source —
type errors, import resolution, go-to-definition, find-references, or hover
type information. Trigger on: "Python LSP", "pyright", "type error", "find
references", "who calls this function", "where is X defined", "why does this
import fail", ".py diagnostics", "missing type stub", "pyrightconfig",
"type checking mode", "reportMissingImports", or any question about .py/.pyi
files that requires real symbol resolution rather than textual search.
---
# python-lsp — Python code intelligence via Pyright
Part of the LSP plugin series. Wraps **Pyright** (`pyright-langserver`)
as a read-only, SOSA Level 1 intelligence source.
## Workflow Process
### Plan
1. Confirm the user's question actually needs semantic info (type diagnostics,
references, definitions, hover) vs a plain grep/glob.
2. Verify `pyright-langserver --version` works. If missing, run
`npm install -g pyright` or `pip install pyright`.
3. Confirm the repo has a recognizable Python root: `pyrightconfig.json`,
`pyproject.toml`, `setup.py`, `setup.cfg`, or a `.git` directory.
### Act
4. Resolve the file path the user is asking about.
5. Use LSP via the plugin's `.lsp.json` wiring:
- `textDocument/publishDiagnostics` → type/import errors
- `textDocument/definition` → jump to definition
- `textDocument/references` → all call sites
- `textDocument/hover` → inferred type / docstring
- `workspace/symbol` → fuzzy symbol search
6. For cross-file impact (e.g. reviewing a change), iterate
`find-references` over every public symbol in the touched file.
7. Treat Pyright answers as authoritative over heuristic search. If Pyright
returns empty references, *say so* — don't invent them.
### Verify
8. Cross-check one reported reference by opening the referenced file. If the
symbol isn't really there, the Pyright index may be stale — report that.
9. If diagnostics include `reportMissingImports` for installed packages, the
virtual environment isn't configured — check `pyrightconfig.json`
`venvPath`/`venv` settings before trusting import counts.
## Pyright startup notes
- **Incremental cache:** Pyright writes `.pyright/` to the workspace root.
Safe to delete to force a full reindex. Subsequent runs are fast.
- **Virtual environments:** Set `venvPath` + `venv` in `pyrightconfig.json`
(or `pythonPath` for a specific interpreter) so Pyright resolves installed
packages correctly.
- **Type checking modes:** `off` → `basic` → `standard` → `strict`. The plugin
sends `basic` via `settings.python.analysis` (a project `pyrightconfig.json`
overrides it); upgrade to `standard` or `strict` for well-typed
codebases where you want exhaustive checking.
## Example `pyrightconfig.json`
```json
{
"typeCheckingMode": "basic",
"pythonVersion": "3.11",
"venvPath": ".",
"venv": ".venv",
"reportMissingImports": true,
"reportMissingTypeStubs": false,
"exclude": ["**/node_modules", "**/__pycache__"]
}
```
## Common Issues (FAQ)
**"reportMissingImports fires on every import."**
Your venv isn't configured. Add `venvPath`/`venv` to `pyrightconfig.json` or
set `pythonPath` to the interpreter that has your dependencies installed.
**"find-references returns fewer hits than I expect."**
Two common causes:
1. Dynamic attribute access (`getattr`, `__dict__`) — Pyright can't statically
resolve these; note them as dynamic in your output.
2. Code in a subpackage that isn't imported into the workspace root — open the
repo root, not a subdirectory.
**"Type stubs missing for a third-party library."**
Install `types-<package>` from PyPI (e.g. `pip install types-requests`) or
add `reportMissingTypeStubs: false` to `pyrightconfig.json` to silence it.
**"Pyright is slow on first open."**
Expected — Pyright indexes the full workspace. Subsequent runs use the
`.pyright/` cache and are much faster. For very large monorepos, add
`"exclude"` patterns to limit the scope.
**"`.pyi` stub files not picked up."**
Set `stubPath` in `pyrightconfig.json` to the directory containing your stubs.
Pyright looks in `typings/` by default.
**"Django / SQLAlchemy dynamic attributes flagged as errors."**
These frameworks use heavy runtime metaprogramming. Install the appropriate
type stubs (`django-stubs`, `sqlalchemy-stubs`) or switch to `"basic"` mode
to suppress dynamic-attribute false positives.
## Out of scope
- Running tests or executing Python code. Pure static analysis only.
- Auto-fixing type errors. Pyright surfaces them; Claude can suggest fixes.
- Refactor execution (rename, extract). Applying edits violates Level-1 SOSA.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · msapps-mobile/claude-plugins | 100 | MIT |
| oaustegard/claude-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version dbe4dfe3f9e4 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100typescript-lsp
Use this skill whenever Claude needs semantic intelligence on TypeScript or JavaScript source — type errors, import resolution, go-to-definition, find-references, or hover type information. Trigger on: "TypeScript LSP", "tsserver", "typescript-language-server", "type error",… - 100java-lsp
Use this skill whenever Claude needs semantic intelligence on Java source — compile errors, type info, go-to-definition, find-references, or call-graph context. Trigger on: "Java LSP", "jdtls", "Eclipse JDT", "find references", "who calls this method", "where is X defined", "why… - 100lsp
Use when working with .ato files and you need semantic code intelligence — hover info, diagnostics, go-to-definition, find-references, or symbol inspection. Triggers on questions like "what type is this", "what members does X have", "where is X defined", "what uses Y", checking… - 90using-lsp-tools
Use when mcp-language-server tools are available and you need semantic code intelligence. Triggers: 'find definition', 'find references', 'who calls this', 'rename symbol', 'type hierarchy', 'go to definition', 'where is this used', 'where is this defined', 'what type is this'.… - 95basedpyright-type-checking
Basedpyright static type checker for Python. Use when setting up type checking, configuring LSP, or comparing type checkers (basedpyright, pyright, mypy alternative). - 100lsp-setup
Enable code intelligence (go-to-definition, find-references, hover, type info) for any programming language by installing and configuring an LSP server for Copilot CLI. Detects the OS, installs the right server, and generates the JSON configuration (user-level or repo-level).…