Skip to content
Development
Skill

/refactor

Invoke IMMEDIATELY via python script when user requests refactoring analysis, technical debt review, or code quality improvement. Do NOT explore first - the script orchestrates exploration.

From plugin
claude-config
89811 skills5 agents
Install
$ npx -y skills add solatis/claude-config --skill refactor --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/refactor

Context preview

The summary Claude sees to decide when to auto-load this skill.

Invoke IMMEDIATELY via python script when user requests refactoring analysis, technical debt review, or code quality improvement. Do NOT explore first - the script orchestrates exploration.

SKILL.md

refactor.SKILL.md
name: refactor
description: Invoke IMMEDIATELY via python script when user requests refactoring analysis, technical debt review, or code quality improvement. Do NOT explore first - the script orchestrates exploration.

Refactor

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invocation

<invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.refactor.refactor --step 1 --n 10" />

| Argument | Required | Description | | -------- | -------- | --------------------------------------------- | | `--step` | Yes | Current step (starts at 1) | | `--n` | No | Number of categories to explore (default: 10) |

Do NOT explore or analyze first. Run the script and follow its output.

Determining N (category count)

Default: N = 10

Adjust based on user request scope:

  • SMALL (single file, specific concern, "quick look"): N = 5
  • MEDIUM (directory, module, standard analysis): N = 10
  • LARGE (entire codebase, "thorough", "comprehensive"): N = 25

The script randomly selects N categories from the 38 available code quality categories defined in conventions/code-quality/.

Ships withclaude-config

I use Claude Code for most of my work. After months of iteration, I noticed a pattern: LLM-assisted code rots faster than hand-written code.

Get the whole plugin