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.
mdr add julianromli/ai-skills/refactor-clean@git:20260505.3e57ae0Pins 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
mdr add julianromli/ai-skills/refactor-clean@sha256:c2677f7f1885889dThe 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.
[](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.
Audit of the latest version
- 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
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
Every file in julianromli/ai-skills