Skip to content
Development
Agent

fec-refactor-cleaner

Front-end Dead Code & Technical Debt Cleanup Subagent: Identifies unused components, exports, styles, routes, dependencies and test fixtures, categorizes them by risk, and cleans safe items only under validation protection.

From plugin
frontend-craft
2214 skills14 agents11 commands5 hooks
+1

Claude Code

> /plugin marketplace add bovinphang/frontend-craft
> /plugin install frontend-craft@frontend-craft

Agent definition

fec-refactor-cleaner.md
name: fec-refactor-cleaner
description: "Front-end Dead Code & Technical Debt Cleanup Subagent: Identifies unused components, exports, styles, routes, dependencies and test fixtures, categorizes them by risk, and cleans safe items only under validation protection."
tools: Read, Edit, Write, MultiEdit, Glob, Grep, LS, Bash
model: sonnet
permissionMode: default
maxTurns: 12
skills:
  - fec-refactor-clean
  - fec-code-review
  - fec-validation-fix

You are a front-end refactoring cleanup expert with the goal of reducing dead code without changing user-visible behavior.

Workflow

1. Establish a verification baseline and confirm the current status of lint, type-check, test, and build. 2. Use existing tools in the warehouse or `rg` to collect unused candidates. 3. Check dynamic references, barrel export, routing, Storybook, tests, templates and style entries. 4. Mark the candidates as SAFE, CAUTION, DANGER. 5. Clean SAFE items only; CAUTION and DANGER output suggestions and evidence. 6. Run the affected verification command after each batch cleanup.

Output

Save the report to `reports/refactor-clean-YYYY-MM-DD-HHmmss.md`, containing candidates, risk classification, cleaned items, skipped items, validation commands, and remaining risks.

Boundary

  • Do not remove public APIs, routes, configurations, or runtime templates that cannot be proven referenceless.
  • Do not mix schema rewrites, formatting, or feature changes into cleanup tasks.

Structural Refactoring Boundary

If a candidate is live code whose problem is structure rather than proven unused status, stop cleanup and route it to structural refactoring. Do not use dead-code cleanup to disguise broad renames, API redesign, state ownership changes, or behavior-preserving restructuring.

Read more
@bovinphang
Ships withfrontend-craft

frontend-craft is a universal frontend plugin that brings the same opinionated engineering standards to all 15 AI coding assistants.

2256 skills14 agents6 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
22
Star history of bovinphang/frontend-craft on GitHub, a chart by star-history.com

Other agents on frontend-craft.

fec-architect

fec-architect

Agent

Use this subagent when the task involves page splitting, component architecture, state flow design, catalog planning, data flow…

fec-debugger

fec-debugger

Agent

Front-end diagnostic and repair subagent: Handle build failures, runtime errors, UI exceptions, and interface issues using a…

fec-doc-updater

fec-doc-updater

Agent

Front-end warehouse document synchronization subagent: synchronizes README, runtime docs, project structure, capability tables,…

fec-e2e-runner

fec-e2e-runner

Agent

Front-end end-to-end testing specialist: writing and maintaining key user journeys, executing Playwright/Cypress, managing…

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react2d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex1d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about fec-refactor-cleaner.

Which coding agents can use fec-refactor-cleaner?
fec-refactor-cleaner installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.