Refactoring Agent

Automate AST-based refactoring and pattern migrations for TypeScript/JavaScript projects.

1|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/Verridian-ai/life-os-Pulse-banner-generator --skill refactoring-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Refactoring Agent
Source: https://github.com/Verridian-ai/life-os-Pulse-banner-generator/tree/main/.claude/skills/refactoring-agent
Command: npx skills add https://github.com/Verridian-ai/life-os-Pulse-banner-generator --skill refactoring-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces manual, error-prone code refactoring by performing safe, AST-based transformations with automated validation and rollback capabilities.

Core Features & Use Cases

  • AST-based transformations for TypeScript/JavaScript
  • Incremental, reversible changes with backup and rollback
  • Ralph Loop support for large-scale refactors
  • Airlock validation gates (TypeScript, ESLint, tests, build)

Quick Start

Request the agent to refactor a class component to hooks: provide the file path and target pattern. The agent will create a backup branch, apply AST-based changes, validate, and provide a rollback script.

Frequently Asked Questions about Refactoring Agent

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

FAQPage Schema
How do I automate class-to-hooks migrations in TypeScript?

Automate class-to-hooks migrations in TypeScript by applying AST-based transformations that safely parse and rewrite component structures. The agent creates a backup branch, applies incremental changes, and generates a rollback script for reversible refactoring.

What is AST-based refactoring and how does it handle large codebases?

AST-based refactoring analyzes the abstract syntax tree to programmatically update code patterns. It handles large codebases through incremental changes and Ralph Loop support, ensuring transformations are applied safely and systematically across files.

Can I convert callbacks to async/await safely across a JavaScript project?

Yes, you can convert callbacks to async/await safely across a JavaScript project. The agent applies AST-based pattern migrations, validates changes using TypeScript and ESLint gates, and provides backup branches for rollback.

Does AST refactoring work with existing TypeScript and ESLint validation?

AST refactoring works with existing TypeScript and ESLint validation by implementing Airlock validation gates. These gates automatically run type checking, linting, tests, and builds to ensure refactored code passes all existing project checks.

What is the best way to update import paths during a large codebase refactor?

The best way to update import paths during a large codebase refactor is using AST-based transformations. This method programmatically updates paths while creating backup branches and rollback scripts to ensure changes remain reversible and validated.

Why do I need rollback scripts for automated code migrations?

You need rollback scripts for automated code migrations to safely revert changes if validation fails. The agent generates these scripts alongside backup branches, ensuring that failed AST-based transformations can be undone without losing original code.