refactor-code

Identify large non-React TypeScript/JavaScript files and propose a refactoring plan.

20|1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/BrOrlandi/my-claude-skills --skill refactor-code-brorlandi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refactor-code
Source: https://github.com/BrOrlandi/my-claude-skills/tree/main/refactor-code
Command: npx skills add https://github.com/BrOrlandi/my-claude-skills --skill refactor-code-brorlandi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the identification of oversized non-UI code files (TS/JS) and provides a structured refactoring plan to improve maintainability and clarity.

Core Features & Use Cases

  • Code discovery: scans project for large non-React files (exclude .tsx/.jsx with JSX and React components).
  • Refactoring planning: suggests modular extraction, file organization, and interface definitions.
  • Execution gating: presents a plan and awaits user approval before making changes.

Quick Start

Provide an initial plan for refactoring identified large non-UI files and await your approval to proceed.

Frequently Asked Questions about refactor-code

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

FAQPage Schema
How do I refactor large TypeScript files to improve codebase modularity?▼

To refactor large TypeScript files, this skill scans your project for oversized non-UI code and proposes a targeted plan for modular extraction, new file paths, and interface definitions. It focuses on non-React .ts and .js files to improve codebase modularity.

Does this code refactoring tool work with React components and .tsx files?▼

No, this code refactoring tool explicitly excludes React components and .tsx or .jsx files. It targets non-UI code such as API routes, services, utilities, hooks, middleware, and schemas written in plain TypeScript or JavaScript.

What is the process for safely refactoring a JavaScript codebase?▼

The process for safely refactoring a JavaScript codebase involves identifying extraction candidates, generating a structured plan with new file paths and interfaces, and awaiting your approval before executing any changes. This ensures safe codebase modifications.

Can I review the refactoring plan before any code changes are made?▼

Yes, you can review the refactoring plan before code changes are made. The skill provides a concrete plan detailing extraction candidates, interfaces, and estimated lines saved, then pauses to await your approval before applying any modifications.

What types of non-UI code are targeted for modular extraction?▼

The non-UI code targeted for modular extraction includes API routes, services, utilities, hooks, middleware, and schemas. It identifies these oversized non-React TypeScript and JavaScript files to propose targeted refactoring plans.