# Rust refactor helper

> Rust refactor helper is an open-source agent skill for developer tools. Guides safe Rust renames, extractions and moves using LSP reference analysis. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/k1-c/linear-tui/tree/main/.claude/skills/rust-refactor-helper
- **Repository:** https://github.com/k1-c/linear-tui
- **GitHub stars:** 21
- **License:** MIT
- **Skill name:** rust-refactor-helper
- **Collection:** https://github.com/k1-c/linear-tui
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill walks an agent through Rust refactors such as renaming a symbol, extracting a block into a function, inlining a function, or moving a symbol to another module. Before changing anything it uses the language server to locate definitions, find every reference and inspect call hierarchies, so the agent can see what a change would touch.

The workflows are step-based. For a rename, the agent checks whether the new name already exists and looks for macro-generated uses, then reports affected files and lines as an impact table with potential issues flagged. Extraction reads the selected lines and classifies variables as inputs, outputs or locals before proposing a signature. Moves list dependencies, callers and the import changes needed, and check for circular dependencies. A dry-run mode is recommended to preview the plan before edits are applied.

The skill is written for Claude Code and expects access to an LSP tool plus file read, search and edit tools. It is meant for Rust projects, and its instructions are partly in Chinese as well as English for trigger phrases.

## When your agent uses it

> Safe Rust refactoring with LSP analysis. Triggers on: /refactor, rename symbol, move function, extract, 重构, 重命名, 提取函数, 安全重构

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/rust-refactor-helper)
- [Asks for: LSP, Read, Glob, Grep, Edit](https://github.com/k1-c/linear-tui/blob/HEAD/.claude/skills/rust-refactor-helper/SKILL.md)
- [License: MIT](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/rust-refactor-helper)

## Features

- **Reference discovery:** Uses language server queries to find definitions, all references and call hierarchies before a change.
- **Rename impact report:** Lists affected files, lines and contexts, and flags conflicts, re-exports and documentation mentions.
- **Function extraction analysis:** Classifies variables in a selected block as inputs, outputs or locals and proposes a signature.
- **Symbol move planning:** Outlines dependencies, required import updates and a circular dependency check for a move.
- **Dry-run mode:** Previews the planned changes so they can be reviewed before any edits are applied.

## Good for

- Rename a function across a Rust crate and its tests
- Extract a block of code in main.rs into a separate function
- Move a struct and its impl block into a services module
- Check what would break before renaming a public API symbol

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/rust-refactor-helper` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/rust-refactor-helper &&
cp -R "$tmp/.claude/skills/rust-refactor-helper" ~/.claude/skills/rust-refactor-helper &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/rust-refactor-helper` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/rust-refactor-helper` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/rust-refactor-helper &&
cp -R "$tmp/.claude/skills/rust-refactor-helper" ~/.agents/skills/rust-refactor-helper &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/rust-refactor-helper` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/rust-refactor-helper` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/rust-refactor-helper &&
cp -R "$tmp/.claude/skills/rust-refactor-helper" ~/.cursor/skills/rust-refactor-helper &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/rust-refactor-helper` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/rust-refactor-helper
```

Or copy the folder to `~/.gemini/skills/rust-refactor-helper` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/rust-refactor-helper`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/rust-refactor-helper &&
cp -R "$tmp/.claude/skills/rust-refactor-helper" ~/.copilot/skills/rust-refactor-helper &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/rust-refactor-helper` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/k1-c/linear-tui.git
```

Then copy `linear-tui/.claude/skills/rust-refactor-helper` into your agent's skills folder as `rust-refactor-helper`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What tools does Rust refactor helper need?

It is declared to use LSP, Read, Glob, Grep and Edit tools.

### How is Rust refactor helper triggered?

It triggers on phrases such as /refactor, rename symbol, move function, extract, and their Chinese equivalents like 重命名 and 提取函数.

### Does Rust refactor helper apply changes automatically?

The workflow recommends running in dry-run mode first to preview changes, and applying edits only after review.

### Does Rust refactor helper include scripts?

No, the skill folder contains a single SKILL.md file and no scripts.

### How do I install Rust refactor helper in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/rust-refactor-helper to use it in all your projects, or to .claude/skills/rust-refactor-helper in one project.

### Does Rust refactor helper run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Rust refactor helper?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Rust refactor helper?

The closest alternatives to Rust refactor helper are Rust code navigator, Rust symbol analyzer, Go refactoring, Refactor and Rust trait explorer.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Rust code navigator](https://ai-powered.com/skills/rust-code-navigator): Rust code navigator is an open-source agent skill for developer tools.
- [Rust symbol analyzer](https://ai-powered.com/skills/rust-symbol-analyzer): Rust symbol analyzer is an open-source agent skill for developer tools.
- [Go refactoring](https://ai-powered.com/skills/go-refactoring): Go refactoring is an open-source agent skill for developer tools.
- [Refactor](https://ai-powered.com/skills/refactor): Refactor is an open-source agent skill for developer tools.
- [Rust trait explorer](https://ai-powered.com/skills/rust-trait-explorer): Rust trait explorer is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Migrate to rust](https://ai-powered.com/skills/migrate-to-rust): Migrate to rust is an open-source agent skill for developer tools.
- [Rust learner](https://ai-powered.com/skills/rust-learner): Rust learner is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/rust-refactor-helper
