refactor
Use when a named refactor, rename, move or internal API reshape must keep behavior unchanged, or a shim or compatibility re-export tempts.
Skill by blauwtje
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/blauwtje-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: backend
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
- Use when a named refactor, rename, move or internal API reshape must keep behavior unchanged, or a shim or compatibility re-export tempts. Not for finding what to refactor, a behavior change (build), or an unproven failure (find-cause).
- License
- MIT
- Instructions
- 49 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- behavior-pin.md · references/
- legacy-api.md · references/
SKILL.md (first lines)
# Refactor Change structure with behavior pinned; leave less code than you found. The enemy is the half-finished move: old API kept beside the new, a shim forwarding to it, or a reshape trusted because it type-checks. The overcorrection is a refactor growing layers for needs nobody has written yet. ## When to use - Named rename, move, extraction, split, flattening or reshape of an internal API whose results must not change. - Pull to keep the old signature, accept both shapes, or leave a re-export "for compatibility". - Not for a behavior change: `build` owns it; mixed request → refactor first, then the change. - Not for persisted data, a stored format or a consumer outside this repository: `build` keeps those compatible on purpose via `../build/references/data-migration.md`. - Not for a failure with unproven cause: `find-cause` owns it. ## The loop 1. **Pin behavior before the first move.** Capture current outputs in a test, snapshot or before/after script over the inputs that matter; type check and lint pin nothing, both pass on a wrong result. 2. **Name the target shape.** One sentence: module layout and call graph as if built today; reshape removes branches, layers or states, never adds indirection. 3. **Subtract first.** Delete dead code, one-caller wrappers and orphaned references before building the new shape. 4. **Migrate every caller, then delete the old API, in the same change.** No shim, deprecated wrapper, both-shapes signature or re-export stays, because nothing then forces the last caller over. Search strings, docs, scripts and tests too; renames miss usages there. 5. **Build no seam for a future caller.** No base class, registry, factory or flag with one implementation; seam arrives with its second adapter; unused sketch code is dropped, not finished. 6. **Prove equality on the real code.** Rerun the pin against old and new versions, quote the comparison; "it compiles" or a green suite that never covered the moved code proves nothing. 7. **Keep it only if reading got easier.** Revert a step that lowers no reader load (fewer files to trace, less state to hold). 8. **Report.** The report rule in `../route-skills/references/closing.md`; equality evidence, line counts and reverted changes go behind the pointer. ## Red flags | The excuse | What holds | |---|---| | "Accept both shapes for now; callers move when someone touches them." | Nobody touches them; dual path becomes permanent. Migrate now; say what the line cap or open PR costs. | | "Keep the re-export so nothing breaks." | Inside one repository a search proves no caller is left; a kept re-export invites new ones. | | "Types and lint pass, so the results held." | Types check shapes, not values; only a before/after run on the same inputs shows equality. | | "No time for tests on a mechanical split." | A throwaway comparison script takes minutes, no committed test needed. | | "Leave it extensible for the variants coming later." | One-implementation seam = indirection; the next variant adds its seam when it lands. | ## References | File | Read it when | |---|---| | `references/behavior-pin.md` | Step 1 when no test covers the code, and step 6 for the comparison. | | `references/legacy-api.md` | Step 4, before keeping any old path, and when a caller belongs to another team's open work. | | `../route-skills/references/closing.md` | Before the final message. | ## Judgment - Pin outranks target shape: a step that breaks it is reverted, never the pin loosened. - Delete-old-API rule covers only APIs whose every caller is in this repository; anything outside follows `../build/references/data-migration.md`. - Deletion outranks addition when both reach the target shape. - Explicit user request to keep the old API outranks step 4; state its cost once, keep it with a removal date.
From blauwtje/exo, MIT.
More from blauwtje/exo
- 0.592score
file-issues
blauwtje
Use when the user types /exo:file-issues to file, open, write or split GitHub issues.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
save-session
blauwtje
Use when the user invokes it to save an unfinished session's state for a fresh session after a clear.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
ship
blauwtje
Use when commits may leave the machine, or the user asks to push, open, watch or merge a pull request or fix its failing checks, conflicts or review comments.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
spec
blauwtje
Use when a request leaves done, data, architecture or a trade-off open.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
start
blauwtje
Use when the user does not remember a skill's name, wants the list of exo skills in plain words, or names a goal and wants exo to pick.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
verify
blauwtje
Use when a plan's tasks are landed and its branch needs the gate before a pull request: the scripted checks, the branch review and its repairs.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
write-docs
blauwtje
Use when writing or editing prose read later: a README, doc page, PR, issue or commit body, changelog line, brief or spec.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
design-ui
blauwtje
Use when a page or component's look or copy changes, or looks empty, boring or generic.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
edit-skills
blauwtje
Use when creating, editing or sizing a skill or agent, and before it is done.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
find-cause
blauwtje
Use when reported wrong behavior (bug, error, crash, regression, slowdown) has no one-command repro, or its proof stays red after one plain fix attempt.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
improve
blauwtje
Use when the user invokes it to raise one score in a repo in an unattended loop, keeping a commit only when one fixed score command gets better and logging…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
prompt
blauwtje
Use when the user invokes it to rewrite a rough prompt into a grounded, tagged prompt for Claude and run it after approval.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 6
- Last commit (this folder)
- Oct 22, 2026 (7 days ago)
- Last release
- Oct 19, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/blauwtje/exo
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from blauwtje
- 0.592score
find-cause
blauwtje
Use when reported wrong behavior (bug, error, crash, regression, slowdown) has no one-command repro, or its proof stays red after one plain fix attempt.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
improve
blauwtje
Use when the user invokes it to raise one score in a repo in an unattended loop, keeping a commit only when one fixed score command gets better and logging…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
file-issues
blauwtje
Use when the user types /exo:file-issues to file, open, write or split GitHub issues.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
design-ui
blauwtje
Use when a page or component's look or copy changes, or looks empty, boring or generic.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
edit-skills
blauwtje
Use when creating, editing or sizing a skill or agent, and before it is done.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
prompt
blauwtje
Use when the user invokes it to rewrite a rough prompt into a grounded, tagged prompt for Claude and run it after approval.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
refactor skill. Agent Mart. https://agentmart.dev/skills/blauwtje-refactor (last updated 2026-10-24)