lsp-rename
정보
이 Claude Skill은 Language Server Protocol(LSP)를 통해 작업 공간 전체에서 코드 심볼을 안전하게 이름 변경합니다. 실행 전에 영향을 받는 모든 참조를 미리 보여주어 확인을 거친 후, 원자적으로 이름 변경 작업을 수행합니다. 프로젝트 전체에서 식별자, 함수, 타입 또는 변수를 안전하게 이름 변경해야 할 때 사용하세요.
빠른 설치
Claude Code
추천npx skills add blackwell-systems/agent-lsp -a claude-code/plugin add https://github.com/blackwell-systems/agent-lspgit clone https://github.com/blackwell-systems/agent-lsp.git ~/.claude/skills/lsp-renameClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
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 symbol is a keyword, a built-in, or
in a location the server cannot rename), stop immediately and report:
Cannot rename
OldName: <server error message> Common causes: built-in or keyword, imported external package, or position is not on the symbol name. Try locating the declaration site directly.
Only proceed to Step 3 if prepare_rename succeeds.
Step 3 — Enumerate references
Call mcp__lsp__find_references at the definition location from Step 1:
mcp__lsp__find_references
file_path: "<file from Step 1>"
position_pattern: "<symbol>@@" # @@ immediately after the symbol name
# fallback: use line/column from Step 1 if position_pattern is unavailable
Collect all returned locations. Note the total count and the distinct files.
Step 4 — Dry-run preview
Call mcp__lsp__rename_symbol with dry_run=true. Do not call apply_edit.
mcp__lsp__rename_symbol
file_path: "<file from Step 1>"
line: <line from Step 1>
column: <column from Step 1>
new_name: "<new_name>"
dry_run: true
The response includes a workspace_edit with all proposed changes and a
preview.note describing the scope.
Step 5 — Report impact and hard stop
Display the preview summary to the user:
Rename preview: OldName -> NewName
Locations to update: N (from find_references count)
Files affected: M (distinct files in workspace_edit)
Language server: <gopls | typescript-language-server | rust-analyzer | ...>
Changes:
path/to/file1.go lines 12, 45, 78
path/to/file2.go line 3
...
REQUIRED hard stop — do not proceed without explicit user confirmation:
Proceed with rename? [y/n]
Wait for user input. Do not apply any edit until the user answers "y" or "yes".
Edge Case: 0 References
If find_references returns an empty list (the symbol exists but has no external
usages), warn the user before stopping:
Warning: no references found for
OldName. The symbol may be unexported, dead code, or the LSP index may be stale. Renaming will update only the declaration site. Proceed anyway? [y/n]
If user answers "n", stop. If "y", continue to Phase 2.
Phase 2: Execute
Only enter this phase after the user answers "y" or "yes" to the confirmation prompt in Phase 1.
Step 1 — Capture pre-rename diagnostics
Before applying changes, capture the current diagnostic state:
mcp__lsp__get_diagnostics
file_path: "<one or more files in the workspace_edit>"
Store the result as before_diagnostics.
Step 2 — Execute rename
Call mcp__lsp__rename_symbol without dry_run (or with dry_run=false):
mcp__lsp__rename_symbol
file_path: "<file from Phase 1 Step 1>"
line: <line from Phase 1 Step 1>
column: <column from Phase 1 Step 1>
new_name: "<new_name>"
This returns a workspace_edit with the full set of changes.
Step 3 — Apply the edit
Call mcp__lsp__apply_edit with the workspace_edit from Step 2:
mcp__lsp__apply_edit
workspace_edit: <workspace_edit from rename_symbol>
Step 4 — Check diagnostics
Call mcp__lsp__get_diagnostics on the affected files and compare against
before_diagnostics:
mcp__lsp__get_diagnostics
file_path: "<affected files>"
Compute introduced vs. resolved errors and display the Diagnostic Summary (see references/patterns.md).
Output Format
After Phase 2 completes, display:
## Rename Summary
- Old name: OldName
- New name: NewName
- Files changed: M
- Locations updated: N
- Post-rename errors: 0
Follow with the Diagnostic Summary if any errors changed (format in references/patterns.md).
Only show Diagnostic Summary sections where N > 0. A net change of 0 means the rename is safe.
Language Support
Tested with gopls, typescript-language-server, and rust-analyzer. Most
LSP-compliant servers support textDocument/rename — agent-lsp works with
any of the 30+ supported language servers that advertise rename capability.
Check your server's capability list via mcp__lsp__get_server_capabilities if
you are unsure.
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
