By aethryl
Python code intelligence for Claude Code via Astral ty — navigation, diagnostics, and semantic rename
npx claudepluginhub aethryl/ty-agent-lspPython code intelligence for the agent via Astral ty — semantic navigation, diagnostics on edit, and the workspace-wide rename Claude Code's built-in LSP tool omits. Uses the project's own pinned ty, and reports every occurrence it could not resolve.
Python code intelligence for Claude Code, backed by ty, Astral's Rust type checker and language server.
The agent navigates Python by symbol instead of by grep: exact references, cheap file outlines, type errors after each edit, and a real workspace-wide rename.
Needs Claude Code v2.1.205+, Python 3.10+, and ty on PATH (uv tool install ty).
/plugin marketplace add Aethryl/ty-agent-lsp
/plugin install ty-agent-lsp@ty-agent-lsp
/reload-plugins
Only one Python LSP can be enabled — the first to claim .py wins. Disable pyright-lsp
if you have it.
ty is resolved per project ($VIRTUAL_ENV → .venv → Poetry → PATH), so the agent's
diagnostics match your CI. Worktrees fall back to the main checkout's environment.
| Tool | Picks the symbol by |
|---|---|
rename_symbol | project-wide name |
rename_at | 1-based file, line, character |
new_name; both dry-run by default — pass dry_run: false to write.(text) or (string).Across 125 real sessions on a 203k-LOC codebase, 63% of tool-output tokens went to Read
and grep. On that same codebase:
| Question | With ty | With grep / Read |
|---|---|---|
Where is UserService used? | 237 refs, 38 files, 0.5s | 163 lines ≈ 4,300 tokens |
| Outline a 2,595-line router | 87 symbols, 740 tokens | 23,305 tokens (31×) |
ReadUserDTO.phone_number → phone | 2 edits, 2 files | 252 lines, 102 files |
OrderService.get → get_by_id | 2 edits, 2 files | 1,846 lines |
ty sees static Python only: getattr, string-keyed dispatch, __all__ entries, registry
keys, migrations, templates and config are invisible to it — and a rename can break them
while ty check still passes. That's what the residual scan reports; (string) hits are
the dangerous ones. It covers .py/.pyi, so grep your templates, SQL and YAML too.
MIT
7-day visitors to each marketplace page
Anthropic example skills
Anthropic's Claude Code plugins, installed from the claude-plugins-official repository
Ultra-compressed communication mode. Shortens prose while preserving technical terms, code, commands, and exact errors.