refactoring-catalog

Catalog refactoring techniques for improving code design and readability.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/hung-phan/system-skills --skill refactoring-catalog-hung-phan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-catalog
Source: https://github.com/hung-phan/system-skills/tree/main/skills/system-review/references/code-design/refactoring-catalog
Command: npx skills add https://github.com/hung-phan/system-skills --skill refactoring-catalog-hung-phan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive catalog of refactoring techniques to help developers improve the design and readability of their code.

Core Features & Use Cases

  • Refactoring Techniques: Offers a curated list of refactorings to address common code smells and improve code structure.
  • Behavior-Preserving Transformations: Ensures that the refactoring process maintains the existing behavior of the code.
  • Use Case: If you have a function that is too long or a switch statement that is growing, this Skill provides the necessary steps to refactor the code while keeping the tests green.

Quick Start

Use the refactoring-catalog skill to apply the 'Extract Function' refactoring to a method that is too long to fit on the screen.

Frequently Asked Questions about refactoring-catalog

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

FAQPage Schema
How do I refactor a function that is too long to fit on the screen?

To refactor a function that is too long, you can apply the 'Extract Function' refactoring technique. This process involves taking segments of a large code block and moving them into a new, separately named function to improve structure and readability.

When do I need to use refactoring techniques in software development?

You need to use refactoring techniques when existing code needs to be cleaned up and design issues emerge. Specifically, applying refactoring is necessary when you encounter code smells like a growing switch statement or a method that is too long to fit on the screen.

How do I apply a refactoring catalog to clean up existing code?

You apply a refactoring catalog by selecting a specific behavior-preserving transformation for your code smell. The catalog provides the necessary steps to execute the refactoring, ensuring you improve code design while keeping the tests green throughout the process.

Does refactoring code change the existing behavior of my software?

Refactoring code does not change the existing behavior of your software. The catalog focuses on behavior-preserving transformations to ensure that the process of improving code design and readability maintains the original functionality without breaking tests.

Do I need to understand refactoring principles before applying these code transformations?

You do need to understand refactoring principles before applying these code transformations. The catalog requires an understanding of these principles and the ability to apply them to ensure the behavior-preserving transformations are executed correctly.

What is the best way to handle a growing switch statement in clean code?

The best way to handle a growing switch statement in clean code is to apply targeted refactoring techniques. The catalog offers specific behavior-preserving transformations designed to address this code smell and improve overall software design.