code-hygiene-refactor

A bounded process for cleaning up code while keeping its observable behavior the same. It covers duplication, obsolete files, dead code, oversized modules, and other technical debt.

In plain words
What is it for?
Use it for cleanup or refactoring tasks, such as removing repeated code, stale files, dead code, unnecessary files, or parts of a low-cohesion module.
Why use it?
It keeps refactoring work controlled and reviewable. It also requires checks and a way to restore removed code if something goes wrong.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/sistema2d/framecode-vibework/code-hygiene-refactor
Any agent
npx skills add Sistema2D/FrameCode-VibeWork --skill code-hygiene-refactor
Clone the repo
git clone --depth 1 https://github.com/Sistema2D/FrameCode-VibeWork

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,213 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.01213
Opus 5 $0.00010 $0.00607
Sonnet 5 $0.00004 $0.00243
Haiku 4.5 $0.00002 $0.00121

Measured 2d ago against content hash e248205685d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-hygiene-refactor 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 2d 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.

FCVW/skills/code-hygiene-refactor/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SKILL: Code Hygiene Refactor

Purpose

Drive active cleanup of duplication, stale files, unnecessary code, oversized modules, and retroactive technical debt while preserving behavior. This skill is a Markdown-only operational tool: it tells the agent what to inspect, what to block, and what evidence to record.

Activation Triggers

Load this skill when:

  • a user reports duplication, monoliths, repeated snippets, stale files, unnecessary files, dead code, technical debt, cleanup, or the Portuguese equivalents: higiene de código, limpeza, duplicação, código duplicado, arquivo obsoleto, arquivo morto, código morto, refatoração, dívida técnica, monolito, or sobras de implementação;
  • retroactive instantiation is applied to an existing project;
  • a file is large, low-cohesion, or repeatedly changed;
  • a plan touches code with known #tech-debt;
  • an agent is tempted to copy/paste similar code;
  • a cleanup/refactoring plan is opened.

Inputs

Active plan and scope, changed-path and ownership evidence, similar-code search, dependency/consumer references, focused behavior checks, and rollback or restoration source for removals.

Non-Negotiable Rules

  • Preserve observable behavior unless a separate functional plan exists.
  • Do not remove dead code without evidence from search, tests, owners, routes, or build behavior.
  • Do not combine broad cleanup with a feature delivery unless the cleanup is required to keep the feature small.
  • Do not introduce new dependencies for cleanup without explicit research and plan approval.
  • Prefer extracting existing repeated logic over inventing generic abstractions.
  • Keep each cleanup batch reviewable and reversible.

Proportionality Check

Before creating a utility, service, wrapper, component, dependency, file, layer, or parallel mechanism, evaluate in order:

  1. Is the behavior necessary in the current scope?
  2. Does the codebase already contain a complete or partial solution?
  3. Does the language, framework, platform, or infrastructure provide a native capability?
  4. Does an already installed dependency solve it adequately?
  5. Only then, is new code justified?

Read the full file on GitHub · 125 lines

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. 2d ago First seen · 125 lines · 20 tokens per session scan A e248205685d4

Subscribe to this mod's changes

code-hygiene-refactor is a skill published in the GitHub repository Sistema2D/FrameCode-VibeWork (21 stars, last pushed 11d ago), licensed Apache-2.0. It adds 20 tokens to every session and 1,213 once invoked, about $0.0001 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.