refactoring

Analyze code architecture and generate a YAML refactoring plan for worker-coder execution.

15|2|Updated May 23, 2026
One-click install
npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill refactoring-vkirill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring
Source: https://github.com/VKirill/antigravity-for-claude-code/tree/main/skills/refactoring
Command: npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill refactoring-vkirill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you analyze an existing codebase’s architecture and produce a safe, actionable refactoring plan when the structure is hard to understand, has boundary violations, or accumulates technical debt.

Core Features & Use Cases

  • Architecture analysis (read-only): scans a chosen scope (file/directory/module) to inventory lines, symbols, responsibilities, and blast radius.
  • Boundary violation detection: flags common refactoring smells like overly large files/functions/classes, mixed concerns, duplication, and risky coupling.
  • Target architecture & migration sequence: designs new module/file boundaries and outputs a YAML plan that a worker-coder executes step-by-step with verification gates.

Quick Start

Use the refactoring skill to generate a YAML refactoring plan for the module you want to restructure, so your worker-coder can execute it without changing behavior unexpectedly.

Frequently Asked Questions about refactoring

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

FAQPage Schema
How do I plan a refactoring for a module with technical debt?

Refactoring a large file starts with read-only architecture analysis to inventory symbols and map dependency impacts. The process outputs a YAML plan with target files, budgets, and migration steps for a worker-coder to execute.

What is architecture analysis for code decomposition?

Architecture analysis for code decomposition is a read-only scan that inventories lines, symbols, and responsibilities within a chosen scope. It detects boundary violations and flags refactoring smells like mixed concerns and risky coupling.

Can I use a YAML plan to decompose a module without changing behavior?

Yes, you can use a YAML plan to decompose a module without changing behavior. The plan designs new module boundaries and delegates code changes to worker-coder tasks with verification gates to prevent unexpected behavior shifts.

Does refactoring analysis detect boundary violations and risky coupling?

Yes, refactoring analysis detects boundary violations and risky coupling. It flags common refactoring smells like overly large files, mixed concerns, duplication, and dependency impacts to map the blast radius of changes.

What's the best way to split a large file and extract new boundaries?

The best way to split a large file and extract new boundaries is generating a structured refactoring plan. It applies cohesion heuristics, maps dependency impacts, and outputs a YAML contract with migration steps for safe execution.

When should I not use an automated refactoring plan?

You should not use an automated refactoring plan when the target scope lacks clear symbols or dependencies to map. The analysis requires symbol discovery and dependency impact mapping to enforce file and class cohesion heuristics accurately.