fec-refactor-clean

fec-refactor-clean is a skill for Claude Code from bovinphang/frontend-craft. It costs 98 tokens per session (869 once invoked), scanned A, original, MIT.

A safe cleanup workflow for unused front-end code, exports, routes, components, and dependencies.

In plain words
What is it for?
Use it to find cleanup candidates, classify their risk, remove only well-supported items, and verify the affected lint, type-check, test, and build commands.
Why use it?
It helps reduce maintenance work while checking that code is truly unused before removing it, including code referenced dynamically or through configuration.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frontend-craft plugin — 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers shipped together

Good fit Use it to find cleanup candidates, classify their risk, remove only well-supported items, and verify the affected lint, type-check, test, and build commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bovinphang/frontend-craft/fec-refactor-clean
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bovinphang/frontend-craft --skill fec-refactor-clean
Clone the repo
git clone --depth 1 https://github.com/bovinphang/frontend-craft

Made for: Claude Code.

Or install frontend-craft, the plugin that ships this one along with the rest of its 56 skills, 11 commands, 14 agents, 5 hooks, 6 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fec-refactor-clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-refactor-clean/github.svg)](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-refactor-clean)
Your own site
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-refactor-clean"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-refactor-clean/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fec-refactor-clean

Your own site · 80×15
<a href="https://agentmods.dev/skills/bovinphang/frontend-craft/fec-refactor-clean"><img src="https://agentmods.dev/badge/skills/bovinphang/frontend-craft/fec-refactor-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00098 $0.00869
Opus 5 $0.00049 $0.00434
Sonnet 5 $0.00020 $0.00174
Haiku 4.5 $0.00010 $0.00087

Measured 5d ago against content hash 549b04bd5d25, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

fec-refactor-clean scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

localized/zh-CN/skills/fec-refactor-clean/SKILL.md · 55 lines

What it actually says

重构清理

用途

在验证保护下识别并清理无用前端代码,减少技术债,同时避免误删动态引用、路由入口、配置文件和运行时约定。

流程

  1. 先建立基线:运行或确认当前 lint、type-check、test、build 的状态。
  2. 收集候选项:
    • 优先使用仓库已有工具,如 knip、depcheck、ts-prune、eslint、TypeScript。
    • 没有工具时,用 rg 检查引用、导出、路由、注册点和文档入口。
  3. 按风险分类:
    • SAFE:测试夹具、未引用工具函数、明确未导出的私有组件。
    • CAUTION:共享组件、feature 入口、样式文件、Storybook stories。
    • DANGER:路由、配置、package scripts、运行时模板、动态 import、插件元数据。
    • UPGRADE:过期依赖、重复依赖、未使用依赖和安全告警先进入依赖升级或依赖清理评估,不与死代码删除混做。
  4. 只自动处理 SAFE 项;CAUTION 和 DANGER 需输出建议和证据,不直接删除。
  5. 每批清理后运行受影响验证命令。
  6. 若验证失败,停止扩大清理范围,先定位该批次。
  7. 清理结束后做行为等价复核:公开 API、路由、命令、模板、metadata、文档示例和报告输出仍可被引用。
  8. 对技术债排序:优先清理有验证保护、影响开发效率或阻塞升级的项目;低证据的大范围重写只输出建议。

前端专项检查

  • 检查 JSX/模板字符串、路由配置、barrel export、Storybook、测试、文档示例和动态组件注册。
  • 样式文件需检查 className、CSS Modules、Tailwind safelist、全局选择器和主题变量。
  • 依赖清理需检查构建插件、运行时模板、CLI scripts、monorepo 子包和 peer dependency。

约束

  • 不改变用户可见行为。
  • 不删除无法证明无引用的公开 API、路由、模板或配置。
  • 不用“一次大删除”替代可验证的小批次清理。
  • 不把格式化、重命名或架构重写混入死代码清理。
  • 不用“看起来没人用”作为证据;必须有搜索、工具输出、类型错误消失或测试保护。
  • 不把依赖大版本升级伪装成清理;升级风险、release notes 和 lockfile 变更应分流到依赖升级工作流。

详细参考

撰写清理报告时,加载 references/report-template.md

预期输出

  • 清理报告保存为 reports/refactor-clean-YYYY-MM-DD-HHmmss.md
  • 代码清理后相关验证命令通过,或明确说明阻塞原因。

结构重构边界

本工作流只负责已经证明无用/未使用的内容。如果代码仍在运行,问题属于过长函数、职责所有权、可变/派生数据、条件逻辑、API 形态或继承设计等结构重构,应分流到保持行为的结构重构,而不是以“清理”名义删除或重写。

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +3 lines 549b04bd5d25
  2. 9d ago First seen · 52 lines · 98 tokens per session scan A 3dfb9e3c29f1

Subscribe to this mod's changes

fec-refactor-clean is a skill published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 7d ago), licensed MIT. It adds 98 tokens to every session and 869 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

phx-review

Review changed Elixir/Phoenix code read-only. Check requirements, cite evidence, deduplicate findings, and return a severity-based verdict.

oliver-kriska/claude-elixir-phoenix · 32 tokens

project-setup

Setup and hardening review for cross-platform modern-C++ (C++17) native projects, especially Node.js addons built with node-gyp / node-addon-api. Use when asked to "set up a native addon", "harden a C/C++ build", "review my binding.gyp", "add compiler hardening flags", "wire up AddressSanitizer/UBSan/TSan/clang-tidy"…

photostructure/coding-skills · 170 tokens

dotnet-backend-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting pure .NET backend code for Kestrel-hosted services. It provides expert critique for REST endpoints, SignalR hubs, TypeScript/React client integration shape, pragmatic Rust interop, application services, AppHost-aware project…

mathisk2095/jko-claude-plugins · 181 tokens

esp32-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting C++ firmware for ESP32 and variants (ESP32-S2, S3, C3, C6, H2, P4) using ESP-IDF or PlatformIO. Provides expert critique covering FreeRTOS task design, memory management (IRAM/DRAM/PSRAM), peripheral drivers (I2C/SPI/UART/GPIO)…

mathisk2095/jko-claude-plugins · 193 tokens

python-backend-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting Python backend code using Litestar or FastAPI with SQLAlchemy or Advanced Alchemy. Provides expert critique covering SOLID principles, hexagonal architecture, repository/service patterns, dependency injection, async correctness…

mathisk2095/jko-claude-plugins · 183 tokens

rust-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting Rust code. Detects edition and toolchain from the project. Provides expert critique covering ownership, error handling, unsafe review, async correctness, trait design, type system patterns, performance, SOLID principles, and…

mathisk2095/jko-claude-plugins · 148 tokens