refactor SKILL.md skillA
refactor from duthaho/skillhub is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add duthaho/skillhub/refactor@git:20260714.f7ff09bPins git:20260714.f7ff09b in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- duthaho/skillhub
- Path
.claude/skills/refactor/SKILL.md- Versions recorded
- 3
- Latest version
- git:20260714.f7ff09b, committed Jul 14, 2026
- First version recorded
- Jul 11, 2026
- Size
- 8,386 bytes
- Repository stars
- 9
- License
- MIT
Evidence-driven refactoring — where does structural improvement actually pay off, then make that change without changing behavior. Survey mode diagnoses by evidence, not aesthetics — git churn × complexity hotspots, the recurring-bug log, upcoming work — and verdicts each candidate REFACTOR/PREP/LEAVE/WATCH, where LEAVE is the default and "the textbook recommends it" is never a reason. Execute mode takes one approved candidate in small behavior-preserving moves, suite green after each. Keeps a…
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 — earn it first, then preserve behavior `/refactor` — survey the repo, emit a brief of where improvement pays off `/refactor <target or goal>` — execute one candidate, safely Answer one question: **where does structural improvement actually pay for itself in this codebase — and how is that change made without changing behavior?** The skill exists to prevent the two documented failure modes of "improve the architecture": refactoring the wrong code (most ugly code is never touched again, so cleaning it returns nothing), and **pattern-itis** — applying design patterns because they're best practices rather than because a problem here demands them, turning straight-line code into abstraction lasagna. ## Survey mode — `/refactor` ### Step 1 — Evidence, not aesthetics Candidates come from signals, never from "this code looks bad": - **Hotspots** — churn × complexity. Churn from git itself: `git log --format= --name-only --since="12 months ago" | sort | uniq -c | sort -rn | head -30`, crossed with a complexity proxy (file length, indentation depth). Code that is both complex *and* frequently edited is …
Read the whole file at its exact version.
How to install
mdr add duthaho/skillhub/refactor@sha256:eb33f09f569365feThe line at the top of this page pins the label git:20260714.f7ff09b, 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_7vcbhkbxirtam5yv)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Jul 11, 2026 and Jul 14, 2026, about one every day.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260714.f7ff09b latest | 2026-07-14 | f7ff09b | 8,386 B | A | view · diff |
| git:20260714.429242b | 2026-07-14 | 429242b | 7,678 B | A | view · diff |
| git:20260711.e00cba7 | 2026-07-11 | e00cba7 | 7,940 B | A | view |
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 (8386 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
duthaho/skillhub · 9 stars · license MIT · pushed 2026-10-31 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_7vcbhkbxirtam5yv GET https://markdownregistry.com/api/v1/resolve?ref=duthaho/skillhub/refactor GET https://markdownregistry.com/api/v1/blob/eb33f09f569365fe03a458d8c0c23f1a52fe74ca67e9f04e593645a0924b9b74
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 duthaho/skillhub
Every file in duthaho/skillhub