Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By juanmhidalgov1.9.0MITIn 1 marketplace
Ranks a repository's technical debt into a prioritized backlog, then proposes tooling to stop confirmed debt recurring. Also plans refactors and extracts code while checking open PRs and branches for conflicting work.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Structured refactoring workflow tools for Claude Code.
# Add marketplace (if not already added)
/plugin marketplace add juanmhidalgo/claude-plugins
# Install plugin
/plugin install refactor@juanmhidalgo-plugins
/refactor:debt-scan [path] [--top N] [--kind K[,K...]] [--detect-only] [--no-npx]Audit a whole repository for technical debt. Deterministic tools find the candidates, a read-only debt-triager judges each one (DEBT, INTENDED, NOT_DEBT, UNSURE), and the result is a backlog ordered by (impact + risk) × (6 − effort).
Stacks are detected per directory, so a monorepo with backend/ and frontend/ gets both sets:
| Detector | Stack | Finds |
|---|---|---|
jscpd v5 (npx) | all | duplicated blocks, classified as versioned copy (X / NewX / XV2 / v4/), half extraction (one side is shared, _internal, composables, utils…), same-file or plain clone |
| Python AST | Python | functions with the same body once identifiers are renamed (copies jscpd v4 missed) |
ruff C901 | Python | functions at or above complexity 15 |
| the repo's eslint | Vue | complexity ≥ 15, functions over 80 lines |
knip (npx) | Vue | unused files and dependencies |
| literals | all | model ids in 3+ files, URLs in 2+ files |
| git log | all | churn over the last year, used to rank |
React is detected but only gets jscpd and literals in this version. Optional .debt-scan.toml at the repo root: exclude globs, [[intentional]] duplication (frozen copies, vendored code) with a reason, [[roots]] to force the stacks, [thresholds]. Without one, the command proposes it from the triage's INTENDED verdicts.
/refactor:debt-scan
/refactor:debt-scan ../other-repo --top 15
/refactor:debt-scan --kind unused,clone/half-extraction # triage only these kinds
/refactor:debt-scan --detect-only
/refactor:debt-guard [path] [--scan <json>] [--triage <json>]... [--write]Run after /refactor:debt-scan. Proposes the tooling that would keep the confirmed debt from coming back, as a ratchet: freeze what exists with a baseline, gate only new code. scripts/debt_guard.py inventories what the repo already has (ruff/ESLint config and version, knip, jscpd, semgrep, import-linter, pre-commit, husky/lint-staged, CI, DEPRECATED.md) and maps each DEBT verdict to a rule:
| Debt | Rule |
|---|---|
| complexity | ruff C90 / ESLint complexity + max-lines-per-function, existing functions frozen (--add-noqa, ESLint bulk suppressions) |
| clones | jscpd on the diff: fails only when a clone touches changed lines |
| versioned copies | a DEPRECATED.md register |
| half-finished extractions, scattered literals | a rule written from the finding (local hook or semgrep) |
| unused files (Vue) | knip in CI with today's findings as the ignore list |
INTENDED verdicts become exclusions; a kind the triage judged not debt is listed as not recommended, one nobody triaged as needing triage first, with the /refactor:debt-scan --kind run that would judge it. Verdicts from several runs (a full one, then --kind ones) are merged, the latest winning. Writes a proposal document to the scratchpad (--write: PROPOSAL-tech-debt-prevention.md at the repo root); never touches configuration.
/refactor:debt-scan && /refactor:debt-guard
/refactor:debt-guard --write
/refactor:analyze <file-or-directory>Analyze code for refactoring opportunities. Identifies complexity, duplication, extraction candidates, and code smells.
Example:
/refactor:analyze src/services/user.py
/refactor:analyze src/components/
/refactor:plan [target]Create a step-by-step refactoring plan with dependencies, checkpoints, and rollback instructions.
Example:
/refactor:plan src/services/user.py
/refactor:plan "reduce complexity in auth module"
/refactor:extract <what-to-extract>Safely extract code into a new function, class, or module. Guides you through naming, placement, and verification.
Example:
/refactor:extract "validation logic from UserService.create"
/refactor:extract "duplicate error handling to ErrorHandler class"
refactor-analyzerExplore stage of the refactor workflow when /refactor:analyze launches it. Explores the codebase for similar code patterns, existing abstractions, test coverage, and consumers/callers, and returns them as structured data for the analysis.
refactor-plannerExplore stage of the refactor workflow when /refactor:plan launches it. Maps test coverage, dependency graphs, past refactoring patterns, and risk areas, and returns them as structured data for the plan.
conflict-scout7-day copy clicks
npx claudepluginhub juanmhidalgo/claude-plugins --plugin refactorBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground