fec-refactor-cleaner

fec-refactor-cleaner is an agent for Claude Code from bovinphang/frontend-craft. It costs 0 tokens per session (379 once invoked), scanned A, original, MIT.

A front-end cleanup agent that finds unused components, exports, styles, routes, dependencies, and test fixtures, then removes only items proven safe. Dead code is code that is no longer used.

In plain words
What is it for?
Cleaning safe unused front-end code and producing a report of removed, skipped, and risky items. It leaves uncertain public APIs, routes, configurations, and runtime templates for review.
Why use it?
It reduces maintenance clutter and technical debt while protecting behavior through checks for hidden references and validation after cleanup.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

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

Good fit Cleaning safe unused front-end code and producing a report of removed, skipped, and risky items. It leaves uncertain public APIs, routes, configurations, and runtime templates for review.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bovinphang/frontend-craft/fec-refactor-cleaner
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.

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-cleaner

README.md
[![agentmods](https://agentmods.dev/badge/agents/bovinphang/frontend-craft/fec-refactor-cleaner.svg)](https://agentmods.dev/agents/bovinphang/frontend-craft/fec-refactor-cleaner)
Your own site
<a href="https://agentmods.dev/agents/bovinphang/frontend-craft/fec-refactor-cleaner"><img src="https://agentmods.dev/badge/agents/bovinphang/frontend-craft/fec-refactor-cleaner.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 379 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.00000 $0.00379
Opus 5 $0.00000 $0.00189
Sonnet 5 $0.00000 $0.00076
Haiku 4.5 $0.00000 $0.00038

Measured 3d ago against content hash 97e18e2705c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

fec-refactor-cleaner 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 3d 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.

agents/fec-refactor-cleaner.md · 36 lines

What it actually says

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.

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. 3d ago Changed · +3 lines 97e18e2705c2
  2. 7d ago First seen · 33 lines · 0 tokens per session scan A 695c0a020dce

Subscribe to this mod's changes

fec-refactor-cleaner is an agent published in the GitHub repository bovinphang/frontend-craft (21 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 379 tokens. 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 agents, from other repositories

mobile-app-builder

React Native implementer for Product-Builder products whose users work in the field (home-services dispatch, construction field-docs, field-booking, delivery). Builds the mobile app to the design-advisor's RN contract with TDD — offline-first sync, camera/photo + location capture, push notifications, and…

avelikiy/great_cto · 122 tokens

testing-reviewer

Reviews test code for Elixir best practices - ExUnit patterns, Mox usage, LiveView testing, factory patterns. Use proactively after writing tests or during code review.

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

qa-engineer

Use after senior-dev completes implementation. Analyzes actual code, then runs type-appropriate QA, writes report, files bugs in Beads.

avelikiy/great_cto · 33 tokens

ai-eval-engineer

Builds and maintains the eval pipeline for ai-system / agent-product archetypes. Outputs tests/eval/EVAL-.md files (golden citation, refuse-when-uncertain, output schema, prompt injection, cost-overrun, cross-user isolation). Runs regression on every prompt or model change. Detects drift.

avelikiy/great_cto · 71 tokens

performance-engineer

Performance specialist. Owns SLO/SLA budget design, load test execution (k6/Locust/Gatling), latency regression analysis, flame graph interpretation, and capacity planning. Runs after senior-dev, before QA. Writes docs/performance/PERF-{slug}.md. Activated when performance-sla is set in PROJECT.md, or archetype is…

avelikiy/great_cto · 83 tokens

app-scaffolder

Project-scaffolding builder that stands up a working base application from the pinned stack-baseline so senior-dev implements FEATURES, not boilerplate. Creates the Next.js + TypeScript + Tailwind/shadcn skeleton, wires Drizzle + Postgres, Auth.js (to the auth-engineer contract), env template, folder structure, CI…

avelikiy/great_cto · 137 tokens