refactor-helper

Automate common refactoring patterns in JavaScript and TypeScript codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/alexanderjamesmcleod/makecents --skill refactor-helper-alexanderjamesmcleod
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-helper
Source: https://github.com/alexanderjamesmcleod/makecents/tree/main/src/skills/automation/refactor-helper.skill
Command: npx skills add https://github.com/alexanderjamesmcleod/makecents --skill refactor-helper-alexanderjamesmcleod

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Refactoring is time-consuming and error-prone. This skill provides a structured, script-driven approach to apply common refactor patterns consistently across codebases, reducing manual effort and drift.

Core Features & Use Cases

  • Pattern-based refactor commands: extract-function, extract-component, rename, to-arrow, split-file, class-to-functional, inline, move, consolidate-imports, destructure, and modernize.
  • Safe execution with backups and dry-run: preview changes before applying and preserve original files.
  • Documentation and migration notes: keeps usage examples and migration details for teams adapting current workflows.

Quick Start

Invoke the tool with a concrete refactor command, for example refactor-helper rename oldName newName.

Frequently Asked Questions about refactor-helper

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

FAQPage Schema
How do I automate common code refactoring patterns across a large JavaScript codebase?

Automate code refactoring across large JavaScript and TypeScript codebases using script-driven commands for tasks like extracting functions, renaming symbols, and consolidating imports to reduce manual effort and drift.

Can I preview code transformations before applying them to my project files?

Yes, you can preview code transformations using the built-in dry-run capability, which allows you to review changes and minimize risk before safely applying modifications to your original files.

Does this refactoring tool support converting class components to functional components?

Yes, the tool supports class-to-functional conversions along with other patterns like to-arrow, split-file, inline, move, destructure, and modernize to transform your codebase consistently.

What is the best way to safely rename symbols and extract functions in a TypeScript project?

The best way to rename symbols and extract functions is using a structured, bash-based entry script that includes backup options, ensuring you can preserve the original state of your files during the transformation.

Are there limitations when applying automated refactoring to large software projects?

Limitations include potential edge cases in complex codebases, but risks are minimized through safe execution with backups and dry-run previews designed specifically for large JavaScript and TypeScript projects.

Do I need specific dependencies installed to run these bash-script refactoring commands?

No specific dependencies are required to run the bash-script refactoring commands, as the tool implements a fully self-contained skill to execute code transformations within your environment.