refactor-audit

Audits whole-project structure to produce an evidence-backed refactoring findings register.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/real-case/marvin-toolkit --skill refactor-audit-real-case
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refactor-audit
Source: https://github.com/real-case/marvin-toolkit/tree/main/plugins/marvin/skills/refactor-audit
Command: npx skills add https://github.com/real-case/marvin-toolkit --skill refactor-audit-real-case

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams planning a cleanup sprint or paying down technical debt often lack an objective, evidence-based view of where the real structural problems are. This Skill performs a read-only, whole-project structural audit and distills architecture, hotspots, dependency tangles, and dead code into a numbered findings register with severity, effort, and file:line evidence. ## Core Features & Use Cases - Architecture mapping and hotspot analysis: Builds a compact architecture map, then crosses git churn with file size to find the files most worth refactoring. - Delegated deep read: Launches a read-only subagent to verify dependency cycles, layering violations, god modules, and dead-code candidates, with every claim spot-checked against cited locations. - Numbered findings register: Writes a report to .marvin/refactor/NNN-audit-<slug>.md with severity and effort per finding, and offers to file findings as board chores via the task MCP tool. - Use Case: Before planning a cleanup sprint, ask for a refactoring audit of the repository to get a ranked register of structural issues — for example, a 1,800-line module changed 47 times in a year and imported by 23 files — each with evidence and a suggested direction. ## Quick Start Ask Claude to run a refactoring audit of this codebase and report the top structural hotspots and tech-debt findings.

Frequently Asked Questions about refactor-audit

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

FAQPage Schema
How do I find technical debt hotspots in a codebase?▼

Cross git churn (commits touching each file over 12 months) with file size in lines; files high on both are the refactoring hotspots. This audit automates that analysis and adds authorship concentration and co-change coupling signals.

How to run a whole-project refactoring audit before a cleanup sprint?▼

Invoke the refactor-audit skill with an optional focus hint. It maps the architecture, detects hotspots and dependency tangles, and writes a numbered findings register with severity, effort, and file:line evidence to .marvin/refactor/.

Does the refactoring audit modify my source code?▼

No, the audit is strictly read-only. It writes exactly one file, the Markdown report under .marvin/refactor/, and never edits, formats, or switches branches in your source tree.

Can a refactoring audit work on a repo with little git history?▼

Yes, but churn signals are meaningless below a few dozen commits. The audit says so, skips the hotspot phase, and bases findings on structural analysis alone, noting the limitation in the report.

What is the difference between refactor-audit and refactor-smells?▼

refactor-audit covers the whole project and produces an architecture map plus a findings register; refactor-smells scans one focused path, module, or diff. Both emit the same register format so their reports compose.