Skip to content
Skill

Rust refactor helper

Guides safe Rust renames, extractions and moves using LSP reference analysis

Rust refactor helper is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
21
Last commit
License
MIT
Listing updated

Similar skills

About Rust refactor helper

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, 重构, 重命名, 提取函数, 安全重构

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (6 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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.

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

Rust refactor helper 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.

More from k1-c/linear-tui

  1. Gives the agent a quick reference of Rust-specific naming, error handling and async rules

    • Open source
    • 21 GitHub stars
    • Developer tools
  2. Guides the agent to write Conventional Commits, splitting mixed changes into several

    • Open source
    • 21 GitHub stars
    • Developer tools
  3. Guides an agent through building Rust command-line tools with clap, config layers

    • Open source
    • 21 GitHub stars
    • Developer tools
  4. Guides the agent through Rust ownership, borrow and lifetime compiler errors

    • Open source
    • 21 GitHub stars
    • Developer tools
  5. Guides an agent in choosing Rust smart pointers like Box, Rc, Arc, Weak and RefCell

    • Open source
    • 21 GitHub stars
    • Developer tools
  6. Guides a Rust agent through E0596/E0499/E0502 borrow errors and interior mutability

    • Open source
    • 21 GitHub stars
    • Developer tools