code-refactoring-refactor-clean

Identify code smells and propose incremental refactor plans with tests.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/BoraPerusic/agents --skill code-refactoring-refactor-clean-boraperusic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactoring-refactor-clean
Source: https://github.com/BoraPerusic/agents/tree/main/skills/to%20try/code-refactoring-refactor-clean
Command: npx skills add https://github.com/BoraPerusic/agents --skill code-refactoring-refactor-clean-boraperusic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor and clean codebases by identifying smells, dependencies, and hotspots, transforming tangled logic into modular, testable components while preserving behavior.

Core Features & Use Cases

  • Assess code smells, coupling, and risk hotspots to determine refactor opportunities.
  • Propose an incremental plan with concrete steps, tests, and validation to minimize regressions.
  • Apply changes in small slices, update tests, and verify that behavior remains stable across revisions.
  • Provide an implementation playbook for repeatable patterns and best practices.

Quick Start

Run an initial assessment and outline incremental refactor steps for a given codebase.

Frequently Asked Questions about code-refactoring-refactor-clean

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor tangled code into clean, maintainable components?

To refactor tangled code, you must first identify code smells, dependencies, and risk hotspots, then apply an incremental plan with concrete steps, tests, and validation to ensure stable behavior throughout the process.

What is the best way to identify code smells and risk hotspots in a codebase?

Identifying code smells and risk hotspots involves assessing coupling and dependencies within the codebase to determine refactor opportunities, which serves as the initial assessment phase before proposing any incremental changes.

How do I safely apply a code refactor without introducing regressions?

To safely apply a code refactor, apply changes in small incremental slices, update tests for each slice, and verify that behavior remains stable across revisions to minimize the risk of regressions.

Can I get an implementation playbook for repeatable refactoring patterns?

Yes, an implementation playbook for repeatable patterns and best practices is provided alongside the incremental refactor plan, ensuring consistent application of advanced refactoring techniques across the codebase.

Does this refactoring approach provide updated tests and diffs for each step?

Yes, the refactoring approach provides updated tests and diffs for each incremental slice, ensuring that every change is validated and behavior remains stable during the software maintenance process.

When do I need an incremental refactor plan for software maintenance?

You need an incremental refactor plan for software maintenance when your codebase has accumulated tangled logic, high coupling, and code smells that require modular, testable components while preserving existing behavior.