Command Palette

Search for a command to run...

Back to skills
skill № 85005

refactor-code

Improve code structure and readability

FreeNo executable scripts
Yuan-lab-LLMby Yuan-lab-LLM★ 17 GitHub stars

Install refactor-code in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Refactor Code

Purpose

Improve code structure and readability

Routing

  • Use when: Use when user asks to improve maintainability, readability, modularity, or error handling in code.
  • Do not use when: Don't use for behavior-only fixes where refactor risk is unnecessary.
  • Outputs: Refactor changes, rationale, and minimal review checklist for behavior-sensitive sections.
  • Success criteria: Preserves behavior while improving structure and readability.

Trigger Examples

Positive

  • Use the refactor-code skill for this request.
  • Help me with refactor code.
  • Use when user asks to improve maintainability, readability, modularity, or error handling in code.
  • Refactor Code: provide an actionable result.

Negative

  • Don't use for behavior-only fixes where refactor risk is unnecessary.
  • Do not use refactor-code for unrelated requests.
  • This request is outside refactor code scope.
  • This is conceptual discussion only; no tool workflow is needed.

Parameters

Name Type Required Description
path string Yes Path to the file to refactor
focus select Yes What to focus on

Runtime Prompt

  • Current runtime prompt length: 235 characters.
  • Runtime prompt is defined directly in ../refactor-code.json.

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the refactor-code skill do?

Improve code structure and readability

How do I install the refactor-code skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the refactor-code skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare refactor-code with