refactor

Plan code refactoring with architecture mapping, dependency tracing, and risk assessment.

9|9|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/nullmastermind/viber-router --skill refactor-nullmastermind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/nullmastermind/viber-router/tree/main/.claude/skills/refactor
Command: npx skills add https://github.com/nullmastermind/viber-router --skill refactor-nullmastermind

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps teams and engineers systematically plan, scope, and execute code refactors while minimizing regressions and hidden complexity by guiding discovery, impact assessment, and implementation planning.

Core Features & Use Cases

  • Explore the problem space: restate goals (Feynman Echo), ask clarifying questions, challenge assumptions, and reframe scope.
  • Investigate the codebase: map architecture, trace dependencies, find integration points, and surface hidden complexity.
  • Compare options: brainstorm approaches, evaluate tradeoffs, and recommend an implementation path with verification criteria.
  • Visualize and document: produce ASCII diagrams for before/after architecture, dependency graphs, and module boundaries.
  • Risk & test planning: identify risks, propose spike investigations, and define test strategies and acceptance checks.
  • Delegation for research: route technology or API research to a researcher subagent when precise external details are required.
  • Verification checklist: includes stress-test questions and a Zero-Fog checklist to make refactor goals objectively verifiable.

Quick Start

Ask the refactor skill to explore a proposed change by describing the target module, the desired improvement, and any constraints or non-negotiables.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I plan a code refactor without introducing regressions?

To plan a code refactor without regressions, you must first explore the scope, map architecture, trace dependencies, and define a test strategy. This creates a verifier-ready plan that assesses impact and identifies risks before implementation begins.

What is the best way to assess the impact of refactoring a subsystem?

The best way to assess the impact of refactoring a subsystem is to trace its dependencies and map integration points across the codebase. This process surfaces hidden complexity and identifies potential risks before any code changes are executed.

How do I compare refactoring approaches for a complex codebase?

Comparing refactoring approaches involves brainstorming options, evaluating tradeoffs, and recommending an implementation path with strict verification criteria. Dependency graphs and module boundary mapping help visualize the before and after architecture for each option.

When do I need a refactoring plan versus directly modifying code?

You need a refactoring plan instead of directly modifying code when dealing with subsystems or system-wide changes that carry hidden complexity. A structured plan provides risk assessment, spike investigations, and acceptance checks to ensure the goals remain objectively verifiable.

Can I route external API research during the refactoring planning process?

Yes, you can route external API research during the refactoring planning process by delegating it to a researcher subagent. This ensures precise technology details are gathered without derailing the core architecture mapping and dependency tracing workflows.