refactor-clean SKILL.md skillA

refactor-clean from julianromli/ai-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add julianromli/ai-skills/refactor-clean@git:20260505.3e57ae0

Pins git:20260505.3e57ae0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
julianromli/ai-skills
Path
skills/refactor-clean/SKILL.md
Versions recorded
1
Latest version
git:20260505.3e57ae0, committed May 5, 2026
Size
5,369 bytes
Repository stars
214
License
none declared

Safely identify and remove dead code with test verification at every step. Use when Codex needs to clean unused exports, files, dependencies, helpers, wrappers, re-exports, or duplicate code without risking regressions. Trigger for dead-code cleanup, unused dependency audits, stale utility removal, cleanup refactors, or requests to reduce code safely before or alongside maintenance work.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Refactor Clean

Use a conservative cleanup loop. Prefer keeping uncertain code over deleting something with hidden runtime or external consumers.

## Workflow

1. Establish a baseline.
2. Detect dead code with language-appropriate tools.
3. Categorize findings into `SAFE`, `CAUTION`, or `DANGER`.
4. Remove one `SAFE` item at a time.
5. Re-run verification after every deletion.
6. Investigate `CAUTION` items before touching them.
7. Skip `DANGER` items unless the user explicitly wants deeper investigation.
8. Consolidate obvious duplicates only after dead-code cleanup is stable.

## Establish A Baseline

- Run the smallest meaningful baseline first, then the broader project checks required by the repo.
- Record whether the suite already fails before cleanup starts.
- Do not treat newly discovered pre-existing failures as caused by the cleanup.
- If the baseline is red in the target area, pause and tell the user before deleting code.

## Detect Dead Code

Choose tools by ecosystem. Prefer the project's package manager and existing scripts where possible.

| Tool | What it finds | Command |
| --- | --- | --- |
| `knip` | Unused exports, files, dependencies | `npx knip` |
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add julianromli/ai-skills/refactor-clean@sha256:c2677f7f1885889d

The line at the top of this page pins the label git:20260505.3e57ae0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_dcwt4iylup4akjpi.svg)](https://markdownregistry.com/a/art_dcwt4iylup4akjpi)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on May 5, 2026.

versioncommittedcommitsizeaudit
git:20260505.3e57ae0 latest2026-05-05 3e57ae0 5,369 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (5369 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

julianromli/ai-skills · 214 stars · license none declared · pushed 2026-10-26 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_dcwt4iylup4akjpi
GET https://markdownregistry.com/api/v1/resolve?ref=julianromli/ai-skills/refactor-clean
GET https://markdownregistry.com/api/v1/blob/c2677f7f1885889d44d43d9cc0c96e18deef8ba4606696643f85a1a5e6c46ece

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from julianromli/ai-skills

agent-browser SKILL.md skill
julianromli/ai-skills · skills/agent-browser/SKILL.md · Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages…
git:20260505.3e57ae0 · audit A · 214 stars
brainstorming SKILL.md skill
julianromli/ai-skills · skills/brainstorming/SKILL.md · You MUST use this before any creative work - creating features, building components, adding functionality, or modifying…
git:20260505.3e57ae0 · audit A · 214 stars
clone-website SKILL.md skill
julianromli/ai-skills · skills/clone-website/SKILL.md · Reverse-engineer and clone one or more websites in one shot — extracts assets, CSS, and content section-by-section and…
git:20260505.3e57ae0 · audit A · 214 stars
collapsible-sidebar SKILL.md skill
julianromli/ai-skills · skills/collapsible-sidebar/SKILL.md · Use this when building a sidebar that collapses to an icon rail, or any element that toggles between shown and hidden…
git:20261025.aa1a923 · audit A · 214 stars
AGENTS.md@skills/composition-patterns AGENTS.md file
julianromli/ai-skills · skills/composition-patterns/AGENTS.md
git:20260505.3e57ae0 · audit A · 214 stars
vercel-composition-patterns SKILL.md skill
julianromli/ai-skills · skills/composition-patterns/SKILL.md
v1.0.0 · audit B · 214 stars
convex-best-practices SKILL.md skill
julianromli/ai-skills · skills/convex-best-practices/SKILL.md · Guidelines for building production-ready Convex apps covering function organization, query patterns, validation…
git:20260505.3e57ae0 · audit A · 214 stars
deploy-to-vercel SKILL.md skill
julianromli/ai-skills · skills/deploy-to-vercel/SKILL.md · Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy…
v3.0.0 · audit A · 214 stars
design-engineer-router SKILL.md skill
julianromli/ai-skills · skills/design-engineer-router/SKILL.md · Use at the start of EVERY design, UI/UX, frontend, motion, copy-on-screen, component, review, or product-idea task…
git:20261026.1a245b1 · audit A · 214 stars
frontend-design SKILL.md skill
julianromli/ai-skills · skills/frontend-design/SKILL.md · Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to…
git:20260505.3e57ae0 · audit A · 214 stars
frontend-skill SKILL.md skill
julianromli/ai-skills · skills/frontend-skill/SKILL.md · Use when the task asks for a visually strong landing page, website, app, prototype, demo, or game UI. This skill…
git:20260505.3e57ae0 · audit A · 214 stars
gpt-taste SKILL.md skill
julianromli/ai-skills · skills/gpt-tasteskill/SKILL.md · Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA…
git:20260505.3e57ae0 · audit A · 214 stars

Every file in julianromli/ai-skills

Other files named refactor-clean

refactor-clean SKILL.md skill
dzhng/skills · skills/engineering/refactor-clean/SKILL.md · Refactor cleanly instead of layering sediment. Use for rename requests, stale or misleading names, legacy leftovers…
git:20261014.e370d6a · audit A · 1,396 stars
refactor-clean SKILL.md skill
dzhng/duet-agent · .agents/skills/refactor-clean/SKILL.md · Refactor cleanly instead of layering sediment. Use for rename requests, stale or misleading names, legacy leftovers…
git:20261014.0781e46 · audit A · 55 stars

Browse by kind, by grade A, or by owner.