Restructure existing code without changing its behavior, through a test-gated refactoring loop: a named target, a green…
Part of Han CodingPack · 11 skills
by testdouble· Developer toolsUnclaimed · Yours? Claim it
About
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 code (use code-review), assess architecture (use architectural-analysis), plan a multi-module restructure before executing it (use plan-a-change), map domain boundaries before restructuring along them (use ddd-analysis), or build new behavior test-first (use tdd). Do not use it on code inside an active tdd loop; the refactor step of tdd owns that cleanup. Runs its planned sequence to completion without pausing for review; to review each named refactoring as it lands, use pairing.
Skills people install alongside refactor.
Runs on your machine.
Runs on your machine.
Runs on your machine.
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.copilot/skills/refactor
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.cursor/skills/refactor
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.claude/skills/refactor
/plugin marketplace add testdouble/han /plugin install han-coding@han
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.agents/skills/refactor
Runs on your machine.
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.gemini/skills/refactor
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor .agents/skills/refactor
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.openclaw/skills/refactor
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.config/opencode/skills/refactor
Runs on your machine.
npx -y degit testdouble/han/han-coding/skills/refactor ~/.hermes/skills/refactor
Scanned and passed · checked 6 h ago
From people who use it
Step by step
Nothing new reaches your agent until a person has looked at it.
Scanned on every change, and again when our rules improve.
No reviews yet. Used refactor? Say how it went.
Write a reviewTw93's engineering habits as eight skills: plan before you build, debug to root cause, review before you ship, and more.
Go skills for coding agents: idiomatic style, error handling, testing, concurrency, security and performance for production Go projects.
Test Double's coding skills: build test-first, refactor under green tests, review your branch and trace bugs to their root cause.
Nobody has shared how they use refactor yet.
Security scan
Passed
Safe to install in every agent it supports. Runs in your agent, as instructions.