refactor

Analyze codebases to plan incremental refactors that preserve behavior.

2|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/ashtonian/llm-init --skill refactor-ashtonian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/ashtonian/llm-init/tree/main/templates/.claude/skills/refactor
Command: npx skills add https://github.com/ashtonian/llm-init --skill refactor-ashtonian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes a codebase to identify technical debt and plan incremental, safe refactors that preserve behavior and reduce risk.

Core Features & Use Cases

  • Opportunity detection: Finds duplication, high complexity, dead code, and loose coupling signals.
  • Impact analysis: Assesses blast radius, test coverage, and risk of changes.
  • Refactoring plan generation: Produces a concrete, taskable plan with before/after snapshots and rollback steps.

Quick Start

Inspect your project with the skill to generate a concrete refactor plan.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I plan a safe code refactor without breaking existing behavior?

To plan a safe code refactor, you must analyze the blast radius and ensure baselined tests pass. This skill generates an incremental refactoring plan with before-and-after snapshots and a documented rollback strategy to preserve behavior.

What are the common signals that indicate I need to refactor technical debt?

Common signals that indicate a need to refactor technical debt include code duplication, high complexity, dead code, and tight coupling. Detecting these triggers helps target specific improvements to reduce structural risk in your codebase.

Can I use this refactoring tool on a large multi-language codebase?

Yes, you can use this on a mid-to-large codebase across multiple languages. It requires a mapped list of affected files and baselined tests to accurately assess impact and guide targeted improvements.

How do I generate a task file for an incremental refactoring plan?

You generate a task file for an incremental refactoring plan by inspecting your project to identify debt signals. The skill produces a concrete, taskable plan complete with impact analysis and rollback steps.

What do I need to assess the blast radius of a code change?

To assess the blast radius of a code change, you need a map of affected files and baselined tests. This allows the impact analysis to evaluate test coverage and calculate the risk of targeted improvements.