rust-refactor-helper

Performs Rust refactoring with LSP-based impact analysis and dry-run support.

1.4k|110|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/actionbook/rust-skills --skill rust-refactor-helper-actionbook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-refactor-helper
Source: https://github.com/actionbook/rust-skills/tree/main/skills/rust-refactor-helper
Command: npx skills add https://github.com/actionbook/rust-skills --skill rust-refactor-helper-actionbook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables safe Rust refactoring by performing comprehensive impact analysis using LSP to safely rename symbols, extract functions, or move code across modules.

Core Features & Use Cases

  • Pre-refactor analysis with LSP operations: findReferences, hover, and incomingCalls to understand symbol usage before applying changes.
  • Refactoring workflows: Rename Symbol, Extract Function, Move Symbol, with explicit impact analysis and dry-run support.
  • Use Case: When restructuring a Rust project, rename a function across crates, extract shared logic into a new function, or relocate a symbol to a dedicated module while preserving correctness.

Quick Start

Use the rust-refactor-helper to perform actions like:

  • /rust-refactor-helper rename parse_config load_config
  • /rust-refactor-helper extract-fn src/main.rs:20-35
  • /rust-refactor-helper move UserService src/services/

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 Rust function across multiple crates?

To safely rename a Rust function across crates, use LSP findReferences to map symbol usage and perform an impact analysis before applying deterministic code edits. This ensures all call sites are updated without breaking compilation.

How do I extract a function from a block of Rust code?

Extract a function by targeting a specific file and line range, such as src/main.rs:20-35. The skill analyzes the selected scope, plans the extraction, and applies explicit code edits to isolate the logic into a new function.

Can I move a Rust symbol to a different module without breaking references?

Yes, you can move a Rust symbol to a dedicated module by running pre-refactor checks using LSP hover and incomingCalls. This verifies incoming dependencies and safely relocates the symbol while preserving correctness.

Does this Rust refactoring workflow support dry-run analysis?

Yes, the Rust refactoring workflow supports dry-run analysis by generating an explicit change plan and impact analysis before any code edits are applied. This allows you to review multi-step workflows safely.

What's the best way to analyze incoming calls before restructuring a Rust project?

The best way to analyze incoming calls during Rust refactoring is using LSP operations like incomingCalls and hover. This provides a comprehensive understanding of symbol usage to prevent regressions.