refactoring-expert

Identify code smells and apply refactoring techniques to JavaScript/TypeScript codebases.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/yuhle-qug/Parking_Management_System --skill refactoring-expert-yuhle-qug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-expert
Source: https://github.com/yuhle-qug/Parking_Management_System/tree/main/.agent/skills/refactoring-expert
Command: npx skills add https://github.com/yuhle-qug/Parking_Management_System --skill refactoring-expert-yuhle-qug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps development teams improve code quality by identifying code smells and applying proven refactoring techniques. It guides safe, incremental changes that preserve external behavior.

Core Features & Use Cases

  • Detects common smells such as long methods, duplicated logic, and complex conditionals.
  • Suggests and applies refactoring techniques (Extract Method, Inline Method, Move Method, Extract Class) with safety checks and tests.
  • Use case: during a difficult maintenance task, isolate responsibilities, reduce cognitive load, and improve readability without altering functionality.

Quick Start

Run the refactoring expert on a legacy module by letting it identify a long function, extract logical units into separate methods, and validate with existing tests.

Frequently Asked Questions about refactoring-expert

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

FAQPage Schema
How do I refactor long methods in JavaScript without changing behavior?

Refactor long methods by applying the Extract Method technique to isolate logical units into separate methods, then validate the changes with existing tests to ensure behavior remains unchanged.

What are common code smells to look for during code reviews?

Common code smells include long methods, duplicated logic, and complex conditionals. Identifying these smells during code reviews helps target areas for refactoring techniques like Move Method or Extract Class.

How do I reduce duplicated logic in a legacy TypeScript codebase?

Reduce duplicated logic by applying refactoring patterns such as Extract Method or Extract Class to consolidate repeated code blocks, running safety checks and linting to preserve external behavior.

Does this refactoring approach work with imperative codebases?

Yes, this refactoring approach targets typical imperative codebases in JavaScript and TypeScript, applying safe incremental changes to improve code quality during maintenance and feature work.

When should I use Move Method versus Extract Class for refactoring?

Use Move Method to relocate a function to a more appropriate class, and use Extract Class when a single class has too many responsibilities, isolating distinct features into separate classes.