refactorer

Automate code refactoring with Extract Function and Replace Conditional with Polymorphism.

12|4|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/TurnaboutHero/oh-my-antigravity --skill refactorer-turnabouthero
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactorer
Source: https://github.com/TurnaboutHero/oh-my-antigravity/tree/main/skills/refactorer
Command: npx skills add https://github.com/TurnaboutHero/oh-my-antigravity --skill refactorer-turnabouthero

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineers improve code quality by guiding and automating refactoring to reduce complexity and technical debt.

Core Features & Use Cases

  • Pattern catalog: Extract Function, Replace Conditional with Polymorphism, Introduce Parameter Object, and SOLID-aligned restructurings.
  • Language-agnostic guidance: Applies to JavaScript, TypeScript, Java, C#, and other OO/functional codebases.
  • Real-world use case: Refactor a monolithic module into focused, testable components with clear interfaces.

Quick Start

Provide a large, complex function or class and ask Refactorer to apply Extract Function, Replace Conditional with Polymorphism, and Introduce Parameter Object to improve readability and maintainability.

Frequently Asked Questions about refactorer

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

FAQPage Schema
How do I refactor messy code to reduce technical debt?

Refactor code by applying Extract Function, Replace Conditional with Polymorphism, and Introduce Parameter Object patterns. The Skill automates identification of code smells and provides step-by-step transformation templates to break down complex functions and classes into maintainable, testable components while preserving behavior.

Can I refactor TypeScript and JavaScript codebases with automated guidance?

Yes. The Skill applies refactoring patterns to TypeScript, JavaScript, Java, C#, and other object-oriented or functional codebases. It uses static analysis to detect smells and generates transformation instructions specific to your language and project structure.

What refactoring patterns does the Skill apply?

Refactoring patterns include Extract Function to break down large functions, Replace Conditional with Polymorphism to eliminate complex conditionals, and Introduce Parameter Object to simplify method signatures. Patterns align with SOLID principles for cleaner, more testable code.

How do I extract functions from a monolithic module?

Provide your large function or class to the Skill. It identifies candidates for extraction, generates focused component boundaries with clear interfaces, and delivers step-by-step refactoring instructions. Result is a modular structure that isolates concerns and improves testability.

Does automated refactoring require existing tests?

While not strictly required, having tests makes refactoring safer and verifies that transformations preserve behavior. The Skill provides instructions for testable changes but works with codebases at any test coverage level.

What code smells does the Skill detect?

The Skill identifies smells including long functions, complex conditionals, and parameter lists that suggest refactoring opportunities. Static analysis flags code that benefits from Extract Function, polymorphism, or parameter object patterns.