mcpField
W
w-refactor

w-refactor

github.com/blockmatic-iceboxDevelopment1647 installsUpdated 4w ago
Repository

About w-refactor

A workflow skill for coding agents that guides behavior-preserving refactoring through a baseline, a small diff, and targeted checks. It is intended for developers making structural changes without authorizing commits or publication.

Key features

  1. 01Record behavior and check baselines
  2. 02Prefer small structural changes
  3. 03Require evidence for algorithm changes
  4. 04Run affected checks only

Use cases

  1. 01Refactor selected files while preserving behavior
  2. 02Reduce duplication and nesting
  3. 03Validate changes against existing checks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/blockmatic-icebox/basilic-skills --skill w-refactor

After installing, type/w-refactorin Claude Code to confirm it loaded.

Details

From the project README

Use the selected files or a named concern. Capture current behavior with tests, types, or a manual scenario before editing. Refactor does not authorize commit, push, or PR.

  1. Record a baseline: what callers depend on, which checks prove it, and what must not change.
  2. Improve structure in the smallest useful diff: extract duplication, clarify names, reduce nesting. Reuse existing packages. Do not add comments that restate the code.
  3. Change algorithms or data structures only with measured evidence from the repository's profiler, tests, or traces.
  4. Run the affected checks from the baseline. Restore behavior if they fail. Never the full pre-push suite.
  5. Docs: /w-docs if behavior or commands changed.

Comments

Markdown supported