new-refactor

Identify and scope refactoring opportunities in a codebase.

2|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/tulgardinc/vibe-check --skill new-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-refactor
Source: https://github.com/tulgardinc/vibe-check/tree/main/.claude/skills/new-refactor
Command: npx skills add https://github.com/tulgardinc/vibe-check --skill new-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interactive session to identify and scope a refactoring opportunity — focusing on code quality, simplification, ergonomics, maintainability, and extensibility.

Core Features & Use Cases

  • Build context by reading project conventions, prior refactors, and code to ground discussions before proposing changes.
  • Read the relevant codebase to diagnose concrete problems across files, functions, and patterns.
  • Propose actionable, measurable scope and a target state to fix structural issues like complexity, duplication, and coupling.
  • Output a structured brief with Problem Statement, Affected Code, Current State Analysis, Target State, Scope, Risks, and Success Criteria.

Quick Start

Describe the area to refactor; the assistant will build context from project conventions, prior refactors, and code before asking questions.

Frequently Asked Questions about new-refactor

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

FAQPage Schema
How do I identify and scope a refactoring opportunity in a complex codebase?

To scope a refactoring opportunity, analyze code smells, complexity, coupling, and missed abstractions across modules to plan structural improvements. This process produces a structured brief covering the Problem Statement, Affected Code, Current State Analysis, Target State, Scope, Risks, and Success Criteria.

What is the best way to plan structural code improvements without breaking existing functionality?

The best way to plan structural code improvements is by diagnosing concrete problems across files, functions, and patterns, then proposing actionable scope and a target state. This approach evaluates risks and defines success criteria to ensure existing functionality remains intact during the refactor.

How do I analyze code complexity and coupling before starting a refactor?

Analyze code complexity and coupling by reading the relevant codebase to diagnose structural issues like duplication and tight dependencies. Building context from project conventions and prior refactors grounds the analysis, ensuring the proposed target state aligns with existing architectural patterns.

Can I use this refactoring approach for any software engineering project?

Yes, you can use this refactoring approach for any software engineering project needing maintainability and extensibility improvements. The session adapts to your specific codebase by reading project conventions and code before proposing measurable, actionable structural changes.

Why does my codebase need a structured refactoring brief instead of just fixing code smells directly?

A structured refactoring brief is needed because it defines the Problem Statement, Scope, Risks, and Success Criteria before changes are made. This prevents unplanned scope creep and ensures that structural improvements to complexity, duplication, and coupling are measurable and impactful.

When should I not use a comprehensive scoping process for code refactoring?

You should not use a comprehensive scoping process for simple, isolated code fixes that lack cross-module complexity, coupling, or missed abstractions. This structured approach is designed for impactful refactors requiring a detailed Target State, Scope, and Risk Assessment.