refactor SKILL.md skillA

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

Install it, pinned
mdr add testdouble/han/refactor@git:20260915.ec2cb7c

Pins git:20260915.ec2cb7c in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
testdouble/han
Path
han-coding/skills/refactor/SKILL.md
Versions recorded
7
Latest version
git:20260915.ec2cb7c, committed Sep 15, 2026
First version recorded
Jul 31, 2026
Size
12,461 bytes
Repository stars
334
License
MIT

Restructure existing code without changing its behavior, through a test-gated refactoring loop: a named target, a green suite over that target before any edit, a planned sequence of small named refactorings, and the full suite re-run after every step. Use when the user wants to refactor, restructure, clean up, simplify, or improve the design of existing code, or to apply refactoring recommendations from a code-review or architectural-analysis report. This skill changes code; it does not review…

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

## Project Context

- git installed: !`which git 2>/dev/null || echo "not installed"`
- current branch: !`git branch --show-current 2>/dev/null || echo unknown`
- working tree: !`git status --porcelain 2>/dev/null | head -5`
- CLAUDE.md: !`find . -maxdepth 1 -name "CLAUDE.md" -type f`
- project-discovery.md: !`find . -maxdepth 3 -name "project-discovery.md" -type f`
- personal config directory: !`bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"`
- project .han/config.md: !`cat .han/config.md 2>/dev/null || echo ""`

As your first action, use the Read tool on `.han/config.md` inside the `personal config directory` path above. A read
that returns no file is no personal configuration: continue silently. When that file or the `project .han/config.md`
probe supplies content, apply it per [config-rule.md](../../references/config-rule.md), which governs precedence
between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.

## Constraints (read before anything else)

This skill restructures existing production and test code in your working tree. It is an execution skill, not a document
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add testdouble/han/refactor@sha256:e8a08c677f38ed36

The line at the top of this page pins the label git:20260915.ec2cb7c, 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_r3z6jh77ncts5xen.svg)](https://markdownregistry.com/a/art_r3z6jh77ncts5xen)

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

Versions

The registry has recorded 7 versions of this file, between Jul 31, 2026 and Sep 15, 2026, about one every 8 days.

versioncommittedcommitsizeaudit
git:20260915.ec2cb7c latest2026-09-15 ec2cb7c 12,461 BA view · diff
git:20260909.9f8a8eb2026-09-09 9f8a8eb 12,385 BA view · diff
git:20260819.52abdf42026-08-19 52abdf4 12,312 BA view · diff
git:20260818.55bdb1d2026-08-18 55bdb1d 11,760 BA view · diff
git:20260814.8b0aad62026-08-14 8b0aad6 12,200 BA view · diff
git:20260814.2ac091e2026-08-14 2ac091e 11,777 BA view · diff
git:20260731.e79299f2026-07-31 e79299f 11,648 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 (12461 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

testdouble/han · 334 stars · license MIT · pushed 2026-11-01 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_r3z6jh77ncts5xen
GET https://markdownregistry.com/api/v1/resolve?ref=testdouble/han/refactor
GET https://markdownregistry.com/api/v1/blob/e8a08c677f38ed36139ffd3febba763b53cd47f1168175cafa1fc87656e47064

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 testdouble/han

han-release SKILL.md skill
testdouble/han · .claude/skills/han-release/SKILL.md · Cut a Han release: update CHANGELOG.md with the changes since the last release, bump and tag every plugin that changed…
git:20260820.33ed427 · audit A · 334 stars
han-update-documentation SKILL.md skill
testdouble/han · .claude/skills/han-update-documentation/SKILL.md · Update Han plugin documentation so every skill, agent, guidance doc, index, and cross-reference is current and…
git:20260730.864d6af · audit A · 334 stars
CLAUDE.md CLAUDE.md file
testdouble/han · CLAUDE.md
git:20260910.1928de6 · audit A · 334 stars
CLAUDE.md@docs/plans CLAUDE.md file
testdouble/han · docs/plans/CLAUDE.md
git:20260529.0702051 · audit A · 334 stars
spike-consumer-adversarial SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-consumer-adversarial/SKILL.md · OI-3 spike harness — heavy consumer, ADVERSARIAL arm. Worst-case early-exit test: the mid-workflow Skill call has no…
git:20260709.3f87cf9 · audit A · 334 stars
spike-consumer-baseline SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-consumer-baseline/SKILL.md · OI-3 spike harness — heavy consumer skill, BASELINE arm. Builds an incident post-mortem and sources the readability…
git:20260709.3f87cf9 · audit A · 334 stars
spike-consumer-forked SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-consumer-forked/SKILL.md · OI-3 spike harness — heavy consumer skill, FORKED arm. Builds an incident post-mortem and sources the readability…
git:20260709.3f87cf9 · audit A · 334 stars
spike-consumer-inline SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-consumer-inline/SKILL.md · OI-3 spike harness — heavy consumer skill, INLINE arm. Builds an incident post-mortem and sources the readability…
git:20260709.3f87cf9 · audit A · 334 stars
spike-guidance-adversarial SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-guidance-adversarial/SKILL.md · OI-3 spike harness — ADVERSARIAL inline guidance variant. Worst-case anchor: ends with a final-sounding completion…
git:20260709.3f87cf9 · audit A · 334 stars
spike-guidance-forked SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-guidance-forked/SKILL.md · OI-3 spike harness — the FORKED (context fork) readability-guidance variant. Same payload as the inline variant but…
git:20260709.3f87cf9 · audit A · 334 stars
spike-guidance-inline SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-guidance-inline/SKILL.md · OI-3 spike harness — the INLINE (non-forked) readability-guidance variant. Surfaces the shared readability standard…
git:20260709.3f87cf9 · audit A · 334 stars
spike-probe SKILL.md skill
testdouble/han · docs/plans/han-communication-plugin/artifacts/oi-3-spike/harness-skills/spike-probe/SKILL.md · Internal harness probe for the OI-3 readability-guidance spike. Use only when explicitly told to invoke spike-probe…
git:20260709.3f87cf9 · audit A · 334 stars

Every file in testdouble/han

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:20261023.af359db · audit A · 70,648 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 · 929 stars
refactor SKILL.md skill
dcouple/pane · main/src/services/paneChatBundle/skills/refactor/SKILL.md · Post-PR refactor pass. Sizes the diff against the remote default branch, fans out refactor-simple (and refactor-deep on…
git:20260924.c3bd4b5 · audit A · 601 stars
refactor SKILL.md skill
greenfield-inc/pane · main/src/services/paneChatBundle/skills/refactor/SKILL.md · Post-PR refactor pass. Sizes the diff against the remote default branch, fans out refactor-simple (and refactor-deep on…
git:20260924.c3bd4b5 · audit A · 600 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:20261021.71bc1e4 · audit A · 450 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 · 450 stars
refactor SKILL.md skill
justxor/claude-code-pro-course · starter-kit/.claude/skills/refactor/SKILL.md · Безопасный рефакторинг маленькими шагами без изменения поведения. Используй, когда просят отрефакторить, упростить…
git:20260930.76c4189 · audit A · 334 stars

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