refactor SKILL.md skillA
refactor from gufranco/claude-engineering-rules is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add gufranco/claude-engineering-rules/refactor@git:20261013.7233f74Pins git:20261013.7233f74 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- gufranco/claude-engineering-rules
- Path
skills/refactor/SKILL.md- Versions recorded
- 5
- Latest version
- git:20261013.7233f74, committed Oct 13, 2026
- First version recorded
- Apr 4, 2026
- Size
- 7,945 bytes
- Repository stars
- 3
- License
- MIT
Guided refactoring with behavior preservation verification. Identifies candidates (long functions, deep nesting, duplicated logic, god classes), proposes a refactoring plan, executes incrementally with tests between steps, and verifies no behavior change. Use when user says "refactor", "clean up this code", "simplify", "extract", "restructure", "reduce complexity", "split this file", or wants to improve code structure without changing behavior. For new features, use /plan; for bug fixes, use…
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
## Overview Incremental refactoring workflow that enforces behavior preservation at every step. Each refactoring is a separate commit with test verification before and after. The refactoring principles follow [`../../rules/code-style.md`](../../rules/code-style.md). This skill provides the execution workflow. ## When to Use - Tests pass, and a function, file, or class crosses one of the Phase 2 thresholds. - A feature is next, and the code it lands in has to be made easy to change first. - `/module-audit` produced a consolidation the user picked. - For new behavior, use `/plan`; for a bug, use `/investigate`; for feedback on a diff, use `/review`. ## Arguments - No arguments: analyze the current branch diff for refactoring candidates. - `<path>`: refactor the specified file or directory. - `--plan-only`: identify and rank candidates without executing any changes. ## Process ### Phase 1: Establish Baseline 1. **Run the full test suite.** Record the result. If tests fail, stop. Do not refactor code with a failing test suite. The user must fix tests first. …
Read the whole file at its exact version.
How to install
mdr add gufranco/claude-engineering-rules/refactor@sha256:3a1ab5eb48cfaaf6The line at the top of this page pins the label git:20261013.7233f74, 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_bwpsac4ogvx7et6h)
0 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Apr 4, 2026 and Oct 13, 2026, about one every 48 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261013.7233f74 latest | 2026-10-13 | 7233f74 | 7,945 B | A | view · diff |
| git:20261012.d086513 | 2026-10-12 | d086513 | 7,812 B | A | view · diff |
| git:20260522.a91f384 | 2026-05-22 | a91f384 | 4,948 B | A | view · diff |
| git:20260521.81b3d41 | 2026-05-21 | 81b3d41 | 4,942 B | A | view · diff |
| git:20260404.b38d04f | 2026-04-04 | b38d04f | 4,919 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 (7945 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
gufranco/claude-engineering-rules · 3 stars · license MIT · pushed 2026-10-30 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_bwpsac4ogvx7et6h GET https://markdownregistry.com/api/v1/resolve?ref=gufranco/claude-engineering-rules/refactor GET https://markdownregistry.com/api/v1/blob/3a1ab5eb48cfaaf6a77174f0773c2f3cba115b89c5e45845dd747c570cbb315d
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 gufranco/claude-engineering-rules
Every file in gufranco/claude-engineering-rules