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.
npx skills add bovinphang/frontend-craft --skill fec-refactor-cleangit clone --depth 1 https://github.com/bovinphang/frontend-craftWrote 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.
[](https://agentmods.dev/skills/bovinphang/frontend-craft/fec-refactor-clean)<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.
<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>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.
| Model | Per session | Once 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 |
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.
What it actually says
重构清理
用途
在验证保护下识别并清理无用前端代码,减少技术债,同时避免误删动态引用、路由入口、配置文件和运行时约定。
流程
- 先建立基线:运行或确认当前 lint、type-check、test、build 的状态。
- 收集候选项:
- 优先使用仓库已有工具,如 knip、depcheck、ts-prune、eslint、TypeScript。
- 没有工具时,用
rg检查引用、导出、路由、注册点和文档入口。
- 按风险分类:
- SAFE:测试夹具、未引用工具函数、明确未导出的私有组件。
- CAUTION:共享组件、feature 入口、样式文件、Storybook stories。
- DANGER:路由、配置、package scripts、运行时模板、动态 import、插件元数据。
- UPGRADE:过期依赖、重复依赖、未使用依赖和安全告警先进入依赖升级或依赖清理评估,不与死代码删除混做。
- 只自动处理 SAFE 项;CAUTION 和 DANGER 需输出建议和证据,不直接删除。
- 每批清理后运行受影响验证命令。
- 若验证失败,停止扩大清理范围,先定位该批次。
- 清理结束后做行为等价复核:公开 API、路由、命令、模板、metadata、文档示例和报告输出仍可被引用。
- 对技术债排序:优先清理有验证保护、影响开发效率或阻塞升级的项目;低证据的大范围重写只输出建议。
前端专项检查
- 检查 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 形态或继承设计等结构重构,应分流到保持行为的结构重构,而不是以“清理”名义删除或重写。
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.
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.
- 5d ago Changed · +3 lines 549b04bd5d25
- 9d ago First seen · 52 lines · 98 tokens per session scan A 3dfb9e3c29f1
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.
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.
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"…
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…
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)…
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…
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…