refactor
Restructure code under a plan, test-first when behavior changes, against a green baseline when it must stay the same.
Skill by GUOJIE-HONG
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/guojie-hong-refactor
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/refactor
What's inside
- Skill name
refactor- Description
- Restructure code under a plan, test-first when behavior changes, against a green baseline when it must stay the same.
- License
- MIT
- Instructions
- 20 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- openai.yaml · agents/
- change.md · references/
- preserve.md · references/
SKILL.md (first lines)
# Refactor 1. **Classify** the request against the current code. Read the code in scope and its callers, then decide: - **Behavior-preserving**: every observable result stays the same (return values, errors, side effects, public interfaces, stored data). Only the structure changes. Follow [`references/preserve.md`](references/preserve.md). - **Behavior-changing**: any observable result differs. Follow [`references/change.md`](references/change.md). It is **breaking** when an existing caller, stored data, or public contract stops working as it did. When the request mixes both, split it into two passes: the behavior-preserving pass first, then the behavior change on top of it. When the code cannot settle the classification, ask the user. Tell the user the classification and the evidence for it before planning. 2. **Plan.** Write `.refactor/<refactor-slug>/plan.md`: - Goal: the observable result. For a behavior-preserving pass, "behavior unchanged" plus the target structure. - Scope: what changes, and what stays untouched. - Test coverage: the tests that exercise this area today, and the gaps. - Steps: the smallest steps you can make, each leaving the code working. For a breaking change, also list every affected caller and contract, and wait for the user's approval of the plan before editing. 3. **Execute** the plan along the path file. When the code contradicts the plan, stop and update the plan with the user before continuing. 4. **Review.** Run `$code-review` with the plan as the spec, pointing it at the review focus in the path file. Fix what it finds. 5. **Report**: the classification, the steps done, the exact test commands and their results, the review findings and how each was resolved, and every deviation from the plan.
From GUOJIE-HONG/skills, MIT.
More from GUOJIE-HONG/skills
- 0.589score
clean-comments
GUOJIE-HONG
Rewrite the existing code comments in a repo or path so each says only what the code is for, and list what needs the user's judgement (comments that disagreed…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
design-code-implement
GUOJIE-HONG
Turn a settled requirement into at least three grounded implementation directions, then record the chosen one.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
open-course
GUOJIE-HONG
Turn a topic into a Course project, a Syllabus plus a Handout and Slides per Lesson, where every factual claim cites a Source read for this Course and a point…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
show-grill-clearly
GUOJIE-HONG
Turn the unresolved decisions of a grilling session into a temporary browser questionnaire, so questions that are hard to follow in chat become clear, while…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
dont-know-how
GUOJIE-HONG
Find direction for a task you don't know how to start.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
ask-jev
GUOJIE-HONG
Let TypeSafe's Jev settle the Open questions your sources leave, and collect the rest into a questionnaire for the person who decides.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
torture-gently
GUOJIE-HONG
Grill the user about a plan, decision, or idea along grounded, decision-relevant branches.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
implement-task
GUOJIE-HONG
Execute to-tasks tickets by dependency order, one fresh sub-agent per ticket in its own worktree, independent tickets in parallel, each ticket merged back and…
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
to-tasks
GUOJIE-HONG
Split each ticket into implementation tasks that write to at most two projects, nested under the ticket.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
implement-all
GUOJIE-HONG
Implement a whole spec on one branch, its tickets in parallel sub-agents following design.md, ending in a merge request on the repository's own host.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
ptns
GUOJIE-HONG
Prompt to new session — hand the current progress to a fresh session as one short prompt, delivered by session-to-session message on Claude Code, or as a…
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
sib
GUOJIE-HONG
Say it back — restate the user's goal and the problem they are solving in your own words, then wait for them to confirm before any work.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 1
- Open issues
- 1
- Last commit (this folder)
- Oct 7, 2026 (23 days ago)
- Last release
- Oct 23, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/GUOJIE-HONG/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from GUOJIE-HONG
- 0.589score
dont-know-how
GUOJIE-HONG
Find direction for a task you don't know how to start.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
show-grill-clearly
GUOJIE-HONG
Turn the unresolved decisions of a grilling session into a temporary browser questionnaire, so questions that are hard to follow in chat become clear, while…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
design-code-implement
GUOJIE-HONG
Turn a settled requirement into at least three grounded implementation directions, then record the chosen one.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
clean-comments
GUOJIE-HONG
Rewrite the existing code comments in a repo or path so each says only what the code is for, and list what needs the user's judgement (comments that disagreed…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
ask-jev
GUOJIE-HONG
Let TypeSafe's Jev settle the Open questions your sources leave, and collect the rest into a questionnaire for the person who decides.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
open-course
GUOJIE-HONG
Turn a topic into a Course project, a Syllabus plus a Handout and Slides per Lesson, where every factual claim cites a Source read for this Course and a point…
SkillAFreshness: A★ 1Claude Code +9
Cite this page
refactor skill. Agent Mart. https://agentmart.dev/skills/guojie-hong-refactor (last updated 2026-10-24)