Tbd
jlevy/strif
Git-native issue tracking (beads), coding guidelines, knowledge injection, and spec-driven planning for AI agents.
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…
$ npx skills add testdouble/han --skill refactor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install testdouble/han refactor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/testdouble/han.git skills-src && mkdir -p .claude/skills && cp -r skills-src/han-coding/skills/refactor .claude/skills/refactor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "refactor" agent skill from https://github.com/testdouble/han/tree/main/han-coding/skills/refactor into .claude/skills/refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/testdouble/han/tree/main/han-coding/skills/refactorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add testdouble/han --skill refactor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install testdouble/han refactor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/testdouble/han.git skills-src && mkdir -p .agents/skills && cp -r skills-src/han-coding/skills/refactor .agents/skills/refactor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refactor" agent skill from https://github.com/testdouble/han/tree/main/han-coding/skills/refactor into .agents/skills/refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add testdouble/han --skill refactor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install testdouble/han refactor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/testdouble/han.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/han-coding/skills/refactor .cursor/skills/refactor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "refactor" agent skill from https://github.com/testdouble/han/tree/main/han-coding/skills/refactor into .cursor/skills/refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/testdouble/han.git --path han-coding/skills/refactor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add testdouble/han --skill refactor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install testdouble/han refactor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/testdouble/han.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/han-coding/skills/refactor .gemini/skills/refactor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "refactor" agent skill from https://github.com/testdouble/han/tree/main/han-coding/skills/refactor into .gemini/skills/refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install testdouble/han refactorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add testdouble/han --skill refactor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/testdouble/han.git skills-src && mkdir -p .github/skills && cp -r skills-src/han-coding/skills/refactor .github/skills/refactor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "refactor" agent skill from https://github.com/testdouble/han/tree/main/han-coding/skills/refactor into .github/skills/refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add testdouble/han --skill refactor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install testdouble/han refactor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/testdouble/han.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/han-coding/skills/refactor .opencode/skills/refactor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "refactor" agent skill from https://github.com/testdouble/han/tree/main/han-coding/skills/refactor into .opencode/skills/refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
refactorRestructure 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…
Refactor is an agent skill from testdouble/han. 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…
Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/refactoring-discipline.md` and `scripts/detect-refactor-context.sh`).
It sits in Development, covering Refactoring, Test-driven development and Code review. It works with Git. The repository describes itself as: Han: AI skills and agents for "Solo" product engineers and small teams. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit abba73a. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGlobGrepBash(git *)Bash(find *)Bash(npm *)Bash(npx *)Bash(pnpm *)…and 9 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
gitbashFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Refactor loads about 3.1k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 248 tokens; SKILL.md has 1,647 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from testdouble/han at commit abba73a, republished under its MIT licence (© testdouble). 1,647 words, ~3,116 tokens.
.claude/skills/refactor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.which git 2>/dev/null || echo "not installed"git branch --show-current 2>/dev/null || echo unknowngit status --porcelain 2>/dev/null | head -5find . -maxdepth 1 -name "CLAUDE.md" -type ffind . -maxdepth 3 -name "project-discovery.md" -type fbash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"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, which governs precedence
between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.
This skill restructures existing production and test code in your working tree. It is an execution skill, not a document generator. These constraints shape every step and override any instinct to move faster. The canon they derive from, with provenance, is in references/refactoring-discipline.md; pull that reference when a step needs the full rule or a step feels off.
/tdd owns cleanup inside the loop, and restructuring
while a test is red violates the two-hats rule both skills share.Bind the target. Resolve the request to a named target: specific files or directories, a named code smell in a named
place, or the refactoring findings in a provided document (a /code-review report, an /architectural-analysis report,
or equivalent). When a findings document is given, extract only the refactoring-shaped findings (structural suggestions,
duplication, naming, coupling) and record each finding's ID so the summary can trace back to it. If the request is
open-ended ("clean up the codebase", "improve quality") with no named target, ask the user for one before doing
anything: open-ended refactoring runs are the documented failure mode this skill exists to avoid, and a wrong guess here
burns the whole run.
Resolve commands. Read CLAUDE.md's ## Project Discovery section for the test command (under
### Commands and Tests), the lint command, the build command, language, and framework. If absent, fall back to
project-discovery.md. If still absent, run ${CLAUDE_SKILL_DIR}/scripts/detect-refactor-context.sh and parse its
output for git state and manifest-inferred commands. A missing test command is a hard blocker: exhaust inference, then
ask the user, because this skill cannot run without a way to verify behavior. Also note any type-check command the
project has; where one exists it runs alongside the tests as a second behavior-preservation check.
Resolve standards and decisions. Resolve the coding-standards directory and ADR directory the same way: CLAUDE.md's
## Project Discovery section, then project-discovery.md, then Glob defaults (docs/, docs/adr/,
docs/coding-standards/, docs/decisions/). Also check CLAUDE.md and AGENTS.md for inline standards. Read the
standards and ADRs whose titles, paths, or one-line summaries indicate they govern the target area; cap at five
documents. The target's restructured form must conform to these. If none exist, state that plainly and infer conventions
from the surrounding code.
Check the tree. If working tree in Project Context shows failing mid-cycle work or the user describes an in-flight
tdd loop on this code, stop and say why (the never-alongside-tdd constraint). Uncommitted but complete work is fine;
recommend committing it first so refactoring diffs stay clean, then proceed.
Run the full suite. Run the resolved test command with Bash. Paste the runner's summary line. If anything is
red, stop: a red suite is not a license to refactor. Report the failures and recommend fixing them first (via
/investigate or /tdd), or re-scoping the target away from the broken area.
Establish coverage of the target. Confirm the target's observable behavior is exercised by the suite: find the tests that drive the target (Glob and Grep for the target's public symbols in test files), and run them scoped if the runner supports it. State plainly which behaviors are covered and which are not. If the target has no meaningful coverage, stop and offer two ways forward, and wait for the user's choice: narrow the target to the covered part, or write characterization tests first using the protocol in references/refactoring-discipline.md. Characterization tests pin current observed behavior (including current bugs) and are a lower-confidence net than intent-written tests; say so in the report.
Plan the whole run before the first edit. Produce a numbered refactoring plan where each item is:
Order the plan so each step leaves the code releasable: small, independent steps first, dependent steps after the steps they need. Report the plan to the user, then continue immediately; this is a report, not a gate. The one exception: if the request explicitly asks to review or approve the plan first, wait for approval.
Take the plan items in order. For each:
Make the one change. Apply the single named refactoring, touching only the files in its declared blast radius. Stay in the refactoring hat: no behavior fixes, no extras spotted along the way (record them for the summary instead).
Run the full suite (and the type-check command where one was resolved). Paste the runner's summary line. Paste full output only when something fails or looks unexpected.
Green: cross the item off and move to the next.
Running collaboratively. When the request asks to review each named refactoring as it lands, which is what
pairing does when it hands work here, stop at this point and hand control back instead of continuing. Present the
stop in the shape collaborative-stop-rule.md specifies. Absent such a
request, continue as below; an ordinary invocation is unchanged.
Red: revert this step. When git is available and the tree was clean at start, git checkout/git restore the
touched files. When git is absent, or the tree was already dirty at start, undo the edits directly instead, so
reverting this step does not discard the user's other work. Do not patch forward over a red suite; a failed step
means the mechanic was unsafe or the coverage was thinner than it looked. Diagnose, then either retry with a smaller
step or defer the item with what you learned.
Stop rules. If the step needed files outside its declared blast radius, or the only way to make it work changes observable behavior, or two consecutive plan items have been reverted: stop, report where things stand (everything already applied is green and stands), and let the user re-scope.
If the user asked for commits, commit after each green step or each logical group of green steps, message naming the refactoring applied, refactoring only.
Run the full test suite, the lint command, and the build command from Step 1. Paste the summary line from each. If lint or build fails on code this skill touched, fix it and re-run; that is in scope.
Summarize for the user:
/issue-triage or the next
/code-review.© testdouble, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (scripts, references) in han-coding/skills/refactor of testdouble/han.
Open the folder on GitHubat commit abba73a
Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Refactor this skilltestdouble/han | 279 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Tbdjlevy/strif | 131 | — | ~3.5k | Automated safety check: Pass | MIT | |
| Happier Implementhappier-dev/happier | 1.9k | — | ~4.2k | Automated safety check: Pass | MIT | |
| Review And Simplify ChangesDimillian/Skills | 4k | — | ~2k | Automated safety check: Pass | MIT | |
| Qe Pair Programmingproffesor-for-testing/agentic-qe | 494 | 6 repos | ~6k | Automated safety check: Pass | MIT | |
| Get Qodo Rulessbusso/claudeclaw | 194 | — | ~1.4k | Automated safety check: Notes | MIT |
jlevy/strif
Git-native issue tracking (beads), coding guidelines, knowledge injection, and spec-driven planning for AI agents.
happier-dev/happier
Implement, change, build, fix, refactor, migrate, or apply accepted review findings in the Happier repositories with canonical-owner discovery, scope-preserving solution economy, TDD, efficient…
Dimillian/Skills
Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes.
proffesor-for-testing/agentic-qe
AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing.
sbusso/claudeclaw
Loads org- and repo-level coding rules from Qodo before code tasks begin, ensuring all generation and modification follows team standards.
npc-live/clawfirm
Software development workflow dispatcher. An agent skill from npc-live/clawfirm.
testdouble/han
Convert a stakeholder summary markdown file into a single self-contained HTML executive report — bottom line and decision asks up front, supporting detail later — styled with a Test Double-derived…
testdouble/han
Update Han plugin documentation so every skill, agent, guidance doc, index, and cross-reference is current and accurate.
testdouble/han
Authoritative guidance for building Claude Code skills, agents, and plugins, plus init and update steps that install and refresh the plugin-building skills in the current repository.
testdouble/han
Cut a Han release: update CHANGELOG.md with the changes since the last release, bump and tag every plugin that changed as {plugin-name}--v{version} so a version-constrained dependency can resolve…
testdouble/han
Builds a feature implementation plan from an existing feature specification (or equivalent context) through a facilitated team conversation.
testdouble/han
Generate a PR description from the current branch's changes against a GitHub PR, using the gh CLI.
Works with
Categories
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…. Refactor is an agent skill from testdouble/han. 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.
Refactor fits situations like: the user wants to refactor; improve the design of existing code; apply refactoring recommendations from a code-review; architectural-analysis report.
Run `npx skills add testdouble/han --skill refactor -a claude-code`. Or copy the skill folder (han-coding/skills/refactor in testdouble/han) into .claude/skills/refactor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add testdouble/han --skill refactor -a codex`. Or copy the skill folder (han-coding/skills/refactor in testdouble/han) into .agents/skills/refactor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add testdouble/han --skill refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor, .gemini/skills/refactor, .github/skills/refactor and .opencode/skills/refactor in your project.
Going by SKILL.md and its folder, Refactor needs a shell for the scripts in its folder and the command-line tools its instructions call (git and bash). Our summary lists: Python 3; Node.js; A Bash shell. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash(git *), Bash(find *), Bash(npm *), Bash(npx *), Bash(pnpm *), Bash(yarn *), Bash(pytest *), Bash(python3 *), Bash(go *), Bash(cargo *), Bash(make *), Bash(bundle *), Bash(rake *), Bash(bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh").
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Refactor: Tbd (jlevy/strif, 131 stars), Happier Implement (happier-dev/happier, 1.9k stars), Review And Simplify Changes (Dimillian/Skills, 4k stars) and Qe Pair Programming (proffesor-for-testing/agentic-qe, 494 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
testdouble (a GitHub organization) maintains it in testdouble/han, which has 279 GitHub stars. The repository holds 54 skills in this directory. The repository was last updated on October 1, 2026.
Source: testdouble/han on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.