No slash command · from refactoring-agent
Decides when to delegate refactoring requests to the refactor subagent and how to craft precise delegation prompts for behavior-preserving code changes.
Ships in refactoring-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Delegate to the refactor subagent (Agent tool, subagent_type: refactor) when the user wants code restructured without behavior change. The subagent executes one atomic refactoring, runs tests to verify behavior preservation, and stops. Doing this work in the main session risks tangling refactor edits with unrelated changes and consumes context on diff-level reasoning.
For broader "what should I refactor?" questions, use plan-refactor instead -- see how-to-plan-refactor.
Delegate when:
plan-refactor report and asks you to carry it out.Handle inline (do not delegate) when:
The subagent requires a specific target. Pass exact instructions: what to refactor, what technique to apply (if known), what scope (one site vs. all instances).
Examples:
getUserData to fetchUserData across the codebase. Verify tests pass."plan-refactor to identify one).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xdg/xdg-claude --plugin refactoring-agent4 skills in this plugin
/how-to-plan-refactorWhen the user asks what to refactor, where to improve code quality, or for analysis of refactoring opportunities, consult this skill to decide whether to delegate to the plan-refactor subagent and how to craft the prompt./plan-refactorAnalyze code and recommend refactoring opportunities/refactorImprove code quality without changing behavior via surgical refactoringOther plugins' skills for the same job