refactor-verify

Verify refactors preserve behavior via symbol, AST, test, and call-site checks.

50|2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/subinium/vibesubin --skill refactor-verify-subinium
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-verify
Source: https://github.com/subinium/vibesubin/tree/main/plugins/vibesubin/skills/refactor-verify
Command: npx skills add https://github.com/subinium/vibesubin --skill refactor-verify-subinium

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rg, git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Proves that a behavior-preserving code change is complete by executing a dependency-tree verification workflow that checks symbol compatibility, AST integrity, behavioral tests, and call-site closure before claiming completion.

Core Features & Use Cases

  • Symbol-set diff ensures public exports survive refactors without unintended drops.
  • AST/byte-diff verifies that moved or renamed bodies are semantically equivalent, aside from formatting.
  • Behavioral verification runs typecheck and the full test suite to confirm no behavioral change.
  • Call-site closure validates that all references are updated and that no call sites are missed.

Quick Start

Run a full verification pass on a candidate refactor to ensure it preserves behavior before merging.

Frequently Asked Questions about refactor-verify

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

FAQPage Schema
How do I verify a refactor preserves behavior before merging?

Verifying a refactor preserves behavior requires a structured workflow that checks symbol compatibility, AST integrity, test suites, and call-site closure. It demands a baseline of green tests before changes to ensure no behavioral shifts occur during the code transformation.

How do you check if all call sites are updated after a code rename?

Checking if all call sites are updated after a code rename involves call-site closure validation. This process ensures that all references to the modified symbols are updated and that no call sites are missed during the refactor.

What is AST diff used for when validating moved code blocks?

AST diff is used to verify that moved or renamed code blocks are semantically equivalent, aside from formatting. It checks the abstract syntax tree to ensure the structural integrity of the code remains intact after the refactor.

Can I run refactor verification on any programming language?

Refactor verification applies to any language with a test suite and symbol exports. It requires baseline green tests before changes and uses dependencies like ripgrep and git to perform independent checks across symbol sets, AST, tests, and call sites.

Why do my tests pass but the refactor is missing public exports?

Tests passing while public exports are missing indicates a gap in symbol-set diff verification. This check ensures public exports survive refactors without unintended drops, complementing behavioral tests to prove the change is complete.