pyright-lsp-tool

Query Python symbol references via Pyright's LSP server.

1|1|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/kunhuang12345/team-skill --skill pyright-lsp-tool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyright-lsp-tool
Source: https://github.com/kunhuang12345/team-skill/tree/main/.codex/skills/pyright-lsp-tool
Command: npx skills add https://github.com/kunhuang12345/team-skill --skill pyright-lsp-tool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides on-demand access to Pyright's language-server features to locate references in Python code without launching a full editor LSP workflow. It reduces setup time and overhead when you only need quick symbol reference lookups.

Core Features & Use Cases

  • On-demand LSP startup: Start pyright-langserver on demand and query references, then shut down to minimize resource usage.
  • Two usage modes: Interactive REPL mode for multiple lookups and a single-shot refs command for a one-off search.
  • Project context awareness: Automatically detects the project root (git top-level or current directory) and supports optional root and virtual environment arguments.

Quick Start

  • Run in REPL mode: python3 .codex/skills/pyright-lsp-tool/scripts/pyright_lsp_tool.py repl
  • Run a single lookup: python3 .codex/skills/pyright-lsp-tool/scripts/pyright_lsp_tool.py refs path/to/file.py:line:col

Frequently Asked Questions about pyright-lsp-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find Python symbol references quickly without launching a full editor?

You can perform a one-off Python reference lookup by running the refs command with the target file path, line number, and column to get exact symbol locations instantly without entering an interactive session.

Does Pyright LSP support interactive REPL mode for multiple reference lookups?

The tool automatically detects the project root by locating the git top-level directory or falling back to the current working directory, and it supports optional arguments to specify custom root paths and virtual environments.

What's the best way to query Python references in a large project using Pyright?

The best way to query Python references is using the on-demand Pyright LSP tool, which starts the language server only when needed and supports project context awareness to deliver accurate symbol lookups with minimal setup overhead.

Do I need a virtual environment to use the Pyright LSP reference lookup tool?

A virtual environment is optional for Pyright LSP reference lookups; the tool supports optional virtual environment arguments to improve resolution accuracy but operates by default using the automatically detected project root context.