mechanical-refactor-verify

Validate mechanical refactors by running a transform script against a target commit.

1.9k|352|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/radixark/miles --skill mechanical-refactor-verify
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mechanical-refactor-verify
Source: https://github.com/radixark/miles/tree/main/.claude/skills/mechanical-refactor-verify
Command: npx skills add https://github.com/radixark/miles --skill mechanical-refactor-verify

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reproducible verification of mechanical refactors by enforcing the use of an auditable transform script in the PR description, ensuring changes are verifiable beyond a plain diff.

Core Features & Use Cases

  • Enforces reproducible transforms via a dedicated transform script
  • Integrates with pre-commit checks and worktree-based verification
  • Ideal for file splits, function moves, and module extractions in PR workflows
  • Supports automated diff validation against a target commit to prevent regressions

Quick Start

Create a reproducible transform script and follow the workflow to verify a mechanical refactor using the provided guide.

Frequently Asked Questions about mechanical-refactor-verify

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

FAQPage Schema
How do I verify a mechanical refactor in a pull request?

To verify a mechanical refactor, you validate a reproducible transform script against a target commit. This ensures PR changes from file splits or module extractions are captured by the script rather than a manual diff.

What is auditable verification for mechanical refactors?

Auditable verification enforces using a reproducible transform script in the PR description. It validates automated diffs against a target commit to ensure changes are verifiable beyond a plain diff.

How do I use git worktree to validate a reproducible transform script?

You create a transform function that operates in a git worktree using base and target commits. Invoking verify_mechanical_refactor gates the diffs to confirm the transform script reproduces the changes.

When do I need to use a transform script for PR review?

You need a transform script for PR review when handling file splits, function moves, or module extractions. It ensures the mechanical refactor is reproducible and verifiable against a target commit.

Can I integrate mechanical refactor verification with pre-commit checks?

Yes, mechanical refactor verification integrates with pre-commit checks. The worktree-based validation triggers during the commit process to gate diffs and prevent regressions before merging.

Why does my manual diff fail verification for a mechanical refactor?

Manual diffs fail verification because the process requires a reproducible transform script. Without a script operating on base and target commits in a worktree, the changes cannot be audited or validated.