rust-refactor-helper

Refactor Rust code with LSP-driven impact analysis and dry-run previews.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/Jylhis/claude-marketplace --skill rust-refactor-helper-jylhis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-refactor-helper
Source: https://github.com/Jylhis/claude-marketplace/tree/main/plugins/rust-dev/skills/rust-refactor-helper
Command: npx skills add https://github.com/Jylhis/claude-marketplace --skill rust-refactor-helper-jylhis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactoring Rust code manually can introduce breaking changes, missed references, and documentation inconsistencies. This Skill provides safe, LSP‑driven analysis and preview to prevent such errors.

Core Features & Use Cases

  • Safe renaming of symbols with full project impact analysis.
  • Extraction of selected code blocks into functions with variable scope handling.
  • Moving symbols to new modules while updating imports and checking for circular dependencies.
  • Dry‑run mode that shows all planned changes before any edits are applied.
  • Integrated LSP queries (references, hover, call hierarchy) to ensure comprehensive analysis.

Quick Start

Run /rust-refactor-helper rename parse_config load_config --dry-run to see a safe preview of all changes across the project.

Frequently Asked Questions about rust-refactor-helper

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

FAQPage Schema
How do I safely rename a symbol across an entire Rust project without missing references?

Safe Rust refactoring uses LSP-guided impact analysis to query all references before applying edits. This ensures symbol renaming captures every occurrence across modules, preventing missed references and breaking changes.

How does LSP-driven dry-run preview work for Rust refactoring?

LSP-driven dry-run preview generates all planned edits without modifying files. It queries references, hover data, and call hierarchy to display a comprehensive impact analysis, letting you verify changes before applying them.

Can I extract a function from a selected code block in Rust and handle variable scope automatically?

Extracting functions in Rust is handled by analyzing the selected code block and managing variable scope. The LSP queries identify captured variables and dependencies, generating correct function signatures and call site edits.

What's the best way to move Rust items to a new module and update imports without circular dependencies?

Moving Rust items to new modules requires LSP analysis to update imports and check for circular dependencies. The refactoring process queries the call hierarchy to ensure module relocation maintains valid dependency graphs.

Do I need an LSP server running to perform safe Rust refactoring?

Yes, an LSP server is required to perform safe Rust refactoring. The Skill depends on LSP queries for references, hover information, and call hierarchy analysis to execute accurate renaming, extraction, and module movement.

Are there limitations to using automated refactoring for Rust documentation and comments?

Automated Rust refactoring primarily targets code symbols and structural edits. While it performs full project impact analysis for code references, documentation inconsistencies may require manual review to ensure all comments match the updated names.