new-refactor

Identify code smells, coupling, and abstraction gaps to produce a refactor brief.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/Capataina/agent-skills --skill new-refactor-capataina
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-refactor
Source: https://github.com/Capataina/agent-skills/tree/main/new-refactor
Command: npx skills add https://github.com/Capataina/agent-skills --skill new-refactor-capataina

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies and scopes refactoring opportunities by surfacing code smells, coupling, and architecture gaps, delivering a concrete brief for targeted improvements.

Core Features & Use Cases

  • Assess code quality and surface refactor opportunities across modules.
  • Produce a structured refactor brief with scope, impact, and migration plan.
  • Use Case: A developer confronts a tangled module and uses this session to generate a plan to decompose it into clearer components.

Quick Start

Describe the target area you want to refactor and let the session generate a scoped refactor brief.

Frequently Asked Questions about new-refactor

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

FAQPage Schema
How do I plan a refactor for a legacy codebase with high coupling?

Planning a refactor involves analyzing the codebase to surface smells, coupling, and abstraction gaps. This session generates a structured refactor brief that documents the current state, target state, scope, risks, and measurable success criteria for targeted improvements.

What is the best way to scope refactoring opportunities in a tangled module?

Scoping refactoring opportunities requires assessing code quality and identifying architecture gaps across the module. This approach produces a concrete brief defining what is in-scope and out-of-scope, alongside a migration plan to decompose the tangled code into clearer components.

How do I document a refactoring workflow before making code changes?

Documenting a refactoring workflow requires capturing the problem statement, current state analysis, target state, and success criteria. This structured approach ensures teams working on large codebases generate a disciplined refactor brief before executing any modifications.

Can I generate a migration plan for code quality improvements without specifying exact files?

Generating a migration plan requires describing the target area you want to refactor. The session then analyzes the relevant context to surface abstraction gaps and produces a scoped refactor brief detailing the impact and steps for the targeted improvements.

When should I not use a structured refactoring workflow for my project?

A structured refactoring workflow is intended for large or legacy codebases where teams need a disciplined session to analyze architecture gaps. It may not suit isolated minor patches that require no formal problem statements or measurable success criteria documentation.

Does this refactoring approach work for diagnosing code smells in existing software?

Diagnosing code smells is a core function of this refactoring approach. It identifies coupling and abstraction gaps by analyzing the existing software, surfacing the specific maintainability issues that need to be addressed in the resulting refactor brief.