Apply Martin Fowler-inspired refactoring rules when improving existing code structure while preserving observable behavior.
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
# Refactoring Skill
Use this skill when a task involves behavior-preserving code improvement, code smells, small refactoring steps, test-backed cleanup, or separating refactoring from feature changes.
Before making design or code decisions, read and apply [refactoring.mini.md](refactoring.mini.md). Use [refactoring.md](refactoring.md) only as a deeper reference when the mini rules are not enough for the current refactoring tradeoff.
The line at the top of this page pins the label git:20260909.802595f, 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.
GET https://markdownregistry.com/api/v1/artifacts/art_jnkcfe2bk6felbkb
GET https://markdownregistry.com/api/v1/resolve?ref=ciembor/agent-rules-books/refactoring
GET https://markdownregistry.com/api/v1/blob/d21cd1a2c17a92a44ec073a8ed341ed2a14986b01d09b9b27a61e5513130517c
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.
ciembor/agent-rules-books · clean-architecture/SKILL.md · Apply Robert C. Martin-inspired architecture rules when separating business policy from frameworks, databases, UI, or…
ciembor/agent-rules-books · clean-code/SKILL.md · Apply Robert C. Martin-inspired clean code rules when improving readability, naming, function design, responsibilities…
ciembor/agent-rules-books · code-complete/SKILL.md · Apply Steve McConnell-inspired construction rules when implementing routines, variables, classes, control flow…
ciembor/agent-rules-books · release-it/SKILL.md · Apply Michael T. Nygard-inspired production reliability rules when designing failure handling, timeouts, retries…
brunob54/superpowers-orchestrator · skills/refactoring/SKILL.md · MUST USE when restructuring existing code without changing behavior: extracting functions/modules, inlining…