lsp-rename

Solid

Two-phase safe rename across the entire workspace. Use when renaming any symbol, function, method, variable, type, or identifier — shows all affected sites before executing atomically via LSP. Never renames without confirmation.

AI & Automation 56 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

> Requires the agent-lsp MCP server. # lsp-rename: Safe Symbol Rename Renames a symbol across the workspace in two phases: preview first, then execute only after explicit confirmation. Never renames without showing impact. **Invocation:** User provides `old_name` (the symbol to rename) and `new_name` (the replacement). Optionally provide `workspace_root` to scope the search. --- ## Prerequisites If LSP is not yet initialized, call `mcp__lsp__start_lsp` with the workspace root first. Auto-inference applies when file paths are provided, but an explicit start is required when switching workspaces. --- ## Phase 1: Preview Find the symbol, enumerate all references, and produce a dry-run preview. **Do not apply any edits in this phase.** ### Step 1 — Locate the symbol Call `mcp__lsp__go_to_symbol` with `symbol_path` set to `old_name`: ``` mcp__lsp__go_to_symbol symbol_path: "old_name" # or "Package.OldName" for qualified paths workspace_root: "<root>" # optional; omit to search entire workspace ``` This returns the definition location (file, line, column). If not found, report the error and stop. ### Step 2 — Validate rename is possible Call `mcp__lsp__prepare_rename` at the definition location from Step 1: ``` mcp__lsp__prepare_rename file_path: "<file from Step 1>" line: <line from Step 1> column: <column from Step 1> ``` `prepare_rename` asks the language server whether a rename is valid at this position. If it returns an error (e.g. the s...

Details

Author
blackwell-systems
Repository
blackwell-systems/agent-lsp
Created
2 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

rename-refs

Atomic rename of Python symbols (functions, classes, methods) or modules using the structural index. Finds all static callers, import sites, __all__ re-exports, and Sphinx docstring cross-refs (:func:, :class:, :meth:, :mod:, :attr:). Optional: keep old name as deprecated alias via pydeprecate (--deprecate) or hard-delete when zero callers (--remove-if-no-callers). TRIGGER when: user asks to rename a Python function, class, method, or module; phrases: "rename X to Y", "rename function", "rename class", "rename module", "move module X to Y", "refactor symbol X into Y", "update all references to X". SKIP: non-Python project; codemap index not built (run /codemap:scan-codebase first); renaming a local variable (not a symbol definition or module path); user explicitly wants grep-only rename without index verification; user performing rename via IDE/LSP and only wants advisory coverage (use --dry-run).

19 Updated yesterday
Borda
Code & Development Solid

lsp-refactor

End-to-end safe refactor workflow — blast-radius analysis, speculative preview, apply to disk, verify build, run affected tests. Inlines lsp-impact + lsp-safe-edit + lsp-verify + lsp-test-correlation into one coordinated sequence.

56 Updated today
blackwell-systems
AI & Automation Solid

ide-refactor

Safe refactoring with snapshot rollback. Creates a checkpoint, performs the refactoring using LSP rename and code actions, runs tests, and rolls back automatically if anything breaks.

24 Updated today
Oolab-labs