refactorkit

Survey a codebase for structural friction and write one ranked refactoring proposal.

1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/mimukit/skills --skill refactorkit-mimukit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactorkit
Source: https://github.com/mimukit/skills/tree/main/skills/refactorkit
Command: npx skills add https://github.com/mimukit/skills --skill refactorkit-mimukit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams know their codebase is hard to change but lack a disciplined way to find which structural change is actually worth making. This Skill reads the repo's churn history, module shapes, and tests, then ranks refactoring candidates against two evidence gates and crowns exactly one, producing a reviewable proposal instead of a generic smell list. ## Core Features & Use Cases - Churn-ranked survey: Uses git history to rank files by change frequency and detect co-changing files, then clusters hot files into 3-5 areas for analysis. - Four closed friction patterns: Hunts only for shallow interfaces, adapter prevalence, untested coupling, and poor locality, each verified against a deletion test and a test-surface gate. - Single crowned proposal: Ranks surviving candidates by strength, leverage, and blast radius, crowns one, and writes a durable Markdown proposal with a Mermaid before/after diagram to docs/refactor/. - Use Case: Run it on a payments module that feels painful to modify; it reads the tree, finds that adapter clusters on one boundary fail the deletion test while a shallow service layer passes both gates, and writes a proposal naming the exact files and callers affected. ## Quick Start Ask the agent to survey this repository with refactorkit and propose the one structural refactoring most worth making.

Frequently Asked Questions about refactorkit

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

FAQPage Schema
How do I find where to refactor in a large codebase?

Run a structural survey that ranks files by git churn, clusters hot files into areas, and checks each candidate against a deletion test and a test-surface gate. refactorkit does exactly this and crowns one refactoring candidate with a written proposal.

How to audit module boundaries and architecture in a repo?

Audit boundaries by looking for four friction patterns: shallow interfaces, adapter clusters, untested coupling, and poor locality from co-changing files. The skill reads the tree and git history, then writes a ranked proposal to docs/refactor/.

Does this refactoring skill modify my source code?

No. It writes exactly one new Markdown proposal file and never edits, moves, or renames source code. The Edit tool is deliberately excluded so the survey stays a recommendation rather than a rationalization.

What happens if the codebase has no git history?

Without git history, such as in a shallow clone, churn ranking is skipped and the scan proceeds by structure alone. The report states plainly that prioritization was skipped so coverage is not overstated.

What if the survey finds nothing worth refactoring?

An empty result is a valid outcome: the skill reports the coverage, states that nothing cleared the gates, and writes no file. This prevents manufactured findings that read like real architecture advice.