fec-refactor-clean

Identify and remove dead frontend code, unused exports, and deprecated routes.

21|3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/bovinphang/frontend-craft --skill fec-refactor-clean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fec-refactor-clean
Source: https://github.com/bovinphang/frontend-craft/tree/main/localized/zh-CN/skills/fec-refactor-clean
Command: npx skills add https://github.com/bovinphang/frontend-craft --skill fec-refactor-clean

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

在验证保护下识别并清理无用代码、未导出项、陈旧路由和未使用依赖,避免功能改变。

Core Features & Use Cases

  • 自动识别并排除死代码、未使用导出和陈旧路由,降低技术债。
  • 基于 lint/type-check/test/build 基线的安全清理策略,输出带风险分级的清理建议。
  • 适用于需要对大型前端仓库进行可控、增量式的结构重构与依赖清理的场景。

Quick Start

Run a targeted cleanup pass to safely remove dead code and unused exports in your frontend project.

Frequently Asked Questions about fec-refactor-clean

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

FAQPage Schema
How do I safely remove dead code and unused dependencies in a frontend project?

Safely removing dead code and unused dependencies requires baseline lint, type-check, test, and build validations. This Skill leverages knip, depcheck, and ts-prune to auto-clean safe items while flagging caution and danger items for review.

What is the best way to clean up unused exports and deprecated routes without changing behavior?

Cleaning up unused exports and deprecated routes without changing behavior requires a safe strategy based on existing lint, type-check, test, and build baselines. This Skill produces a structured cleanup plan that auto-cleans safe items and flags dangerous ones for manual review.

Do I need baseline lint and test validations before running a frontend refactor cleanup?

Yes, baseline lint, type-check, test, and build validations are required before running a frontend refactor cleanup. These validations serve as the safety net to ensure that removing dead code, unused exports, and unused dependencies does not change application behavior.

How does the dead code cleanup workflow handle risky unused dependencies?

The dead code cleanup workflow handles risky unused dependencies by categorizing findings into SAFE, CAUTION, and DANGER levels. It auto-cleans SAFE items while flagging CAUTION and DANGER items for manual review in a structured markdown report.

Can I use knip and ts-prune for incremental structural refactoring in large frontend repositories?

Yes, you can use knip and ts-prune for incremental structural refactoring in large frontend repositories. This Skill applies a controlled cleanup strategy to identify and remove dead code and unused dependencies, reducing technical debt gradually.

What limitations should I expect when pruning deprecated routes and dead code?

When pruning deprecated routes and dead code, the limitation is that not all items are auto-removed. CAUTION and DANGER items require manual review to prevent behavior changes, meaning you must inspect the generated cleanup report before finalizing risky deletions.