refactor SKILL.md skillA

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

Install it, pinned
mdr add rustyrazorblade/skills/refactor@git:20260826.33297a2

Pins git:20260826.33297a2 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
rustyrazorblade/skills
Path
plugins/dev-skills/skills/refactor/SKILL.md
Versions recorded
1
Latest version
git:20260826.33297a2, committed Aug 26, 2026
Size
7,665 bytes
Repository stars
44
License
Apache-2.0

Plan and execute a behavior-preserving structural change, then hold the refactoring contract for the whole run. Use this skill when the user says "refactor this", "clean up this code", "restructure", "extract this", "split this up", "pay down tech debt", or "the tests are fighting me"; when the work is a `type:tech-debt` issue; or at the REFACTOR step of a TDD cycle. It produces a written plan for the owner to approve before anything is deleted or moved, and it governs every failing test after…

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

Structure changes; behavior does not.  This skill has two parts, because a plan alone enforces nothing.

**Part 1 is the plan.** You write it before you delete or move anything, and the owner approves it.

**Part 2 is the standing contract.** Rules R1, R2, and R3 bind you for the whole run.

## Do not use this skill for a behavior change

A behavior change is supposed to break tests.  This skill treats a broken test as evidence of a mistake, so it gives the wrong answer for feature work.  Use ordinary TDD instead.

If the work mixes both, split it.  Land the structural half first, under this skill.  Then make the behavior change as its own commit.  That split is R4, and Part 1 sequences it for you.

## The contract is live, not advisory

This text is in your context right now, and it stays there.  So the triage gate below applies at the moment a test actually goes red, not only while you plan.  Read R2 again at that moment.  Do not act from memory of it.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add rustyrazorblade/skills/refactor@sha256:61a8f5dd6d484453

The line at the top of this page pins the label git:20260826.33297a2, 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_laygz7rfxe7lbiqm.svg)](https://markdownregistry.com/a/art_laygz7rfxe7lbiqm)

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

Versions

The registry has recorded 1 version of this file, committed on Aug 26, 2026.

versioncommittedcommitsizeaudit
git:20260826.33297a2 latest2026-08-26 33297a2 7,665 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 (7665 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

rustyrazorblade/skills · 44 stars · license Apache-2.0 · pushed 2026-10-31 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_laygz7rfxe7lbiqm
GET https://markdownregistry.com/api/v1/resolve?ref=rustyrazorblade/skills/refactor
GET https://markdownregistry.com/api/v1/blob/61a8f5dd6d4844531c25a59d0fff42def38301f0d910af11e1e60b96a95addb7

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 rustyrazorblade/skills

openspec-apply-change SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-apply-change/SKILL.md · Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or…
v1.0 · audit A · 44 stars
openspec-archive-change SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-archive-change/SKILL.md · Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after…
v1.0 · audit A · 44 stars
openspec-bulk-archive-change SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-bulk-archive-change/SKILL.md · Archive multiple completed changes at once. Use when archiving several parallel changes.
v1.0 · audit A · 44 stars
openspec-explore SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-explore/SKILL.md · Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use…
v1.0 · audit A · 44 stars
openspec-onboard SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-onboard/SKILL.md · Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
v1.0 · audit A · 44 stars
openspec-propose SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-propose/SKILL.md · Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they…
v1.0 · audit A · 44 stars
openspec-sync-specs SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-sync-specs/SKILL.md · Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta…
v1.0 · audit A · 44 stars
openspec-verify-change SKILL.md skill
rustyrazorblade/skills · .claude/skills/openspec-verify-change/SKILL.md · Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete…
v1.0 · audit A · 44 stars
CLAUDE.md CLAUDE.md file
rustyrazorblade/skills · CLAUDE.md
git:20260907.450260a · audit A · 44 stars
data-model SKILL.md skill
rustyrazorblade/skills · plugins/cassandra-expert/skills/data-model/SKILL.md · Data modeling and schema design for Apache Cassandra. Use when designing tables, choosing partition keys, modeling…
git:20261031.8909b5e · audit A · 44 stars
diagnose SKILL.md skill
rustyrazorblade/skills · plugins/cassandra-expert/skills/diagnose/SKILL.md · Systematic troubleshooting for Apache Cassandra clusters. Use when diagnosing performance issues, latency problems…
git:20261031.8909b5e · audit A · 44 stars
optimize SKILL.md skill
rustyrazorblade/skills · plugins/cassandra-expert/skills/optimize/SKILL.md · Performance optimization for Apache Cassandra clusters. Use when tuning configuration, improving throughput, reducing…
git:20261031.8909b5e · audit A · 44 stars

Every file in rustyrazorblade/skills

Other files named refactor

refactor SKILL.md skill
code-yeongyu/oh-my-openagent · packages/shared-skills/skills/refactor/SKILL.md · Guides a refactor, cleanup, or restructure with the right decomposition. Use when the user asks to refactor, simplify…
git:20261106.b98a091 · audit A · 70,763 stars
refactor SKILL.md skill
sethgammon/citadel · skills/refactor/SKILL.md · Safe multi-file refactoring with automatic rollback. Establishes a type/test baseline, plans all changes, executes…
git:20260611.0f3f8e7 · audit A · 927 stars
refactor SKILL.md skill
greenfield-inc/pane · main/src/services/paneChatBundle/skills/refactor/SKILL.md · Quality pass on a branch against its remote default branch. Runs a simple analysis (conventions and smells) and, on…
git:20261105.60e9622 · audit A · 603 stars
refactor SKILL.md skill
dcouple/pane · main/src/services/paneChatBundle/skills/refactor/SKILL.md · Quality pass on a branch against its remote default branch. Runs a simple analysis (conventions and smells) and, on…
git:20261105.60e9622 · audit A · 603 stars
refactor SKILL.md skill
rsmdt/the-startup · plugins/start/skills/refactor/SKILL.md · Refactor, simplify, or clean up code for improved maintainability without changing business logic
git:20261011.48bd3ee · audit A · 577 stars
refactor SKILL.md skill
boshu2/agentops · skills/refactor/SKILL.md · Restructure or clean up code with no behavior change, proved by before-and-after checks. Use when: asked to clean up…
git:20261031.73cbeae · audit A · 453 stars
refactor SKILL.md skill
boshu2/agentops · plugin/skills/refactor/SKILL.md · Restructure or clean up code with no behavior change, proved by before-and-after checks. Use when: asked to clean up…
git:20261026.1b5f59a · audit A · 453 stars
refactor SKILL.md skill
justxor/claude-code-pro-course · starter-kit/.claude/skills/refactor/SKILL.md · Безопасный рефакторинг маленькими шагами без изменения поведения. Используй, когда просят отрефакторить, упростить…
git:20260930.76c4189 · audit A · 341 stars

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