with one click
refactor
Propose minimal, safe code improvements without changing behavior
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Propose minimal, safe code improvements without changing behavior
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | refactor |
| description | Propose minimal, safe code improvements without changing behavior |
| argument-hint | staged | changes | <file-path> |
Use for behavior-preserving cleanup.
Arg: staged | changes | <file-path>.
If missing: print only Usage: refactor staged | refactor changes | refactor <file-path>; exit.
Scope:
staged: run git diff --cached --stat, then git diff --cachedchanges: run git diff --stat, then git diff<file-path>: verify file exists, read only that file, refactor only that fileRules:
rtk <cmd> via the bash tool, never raw command; git status = bad, rtk git status = good.Refactor canceled: cannot guarantee behavior safety within scope. and stopSelf-Check:
Do Not:
Output:
Type "continue" to apply this refactor.
Anything else cancels.Apply:
Apply only if next reply is exactly continue:
git status --shortgit diff --statAudit staged, unstaged, or file-scoped changes for bugs, risks, and minimal risk-reducing fixes
Generate and optionally apply a Conventional Commit from staged changes
Update the existing PR for the current branch when one exists, otherwise create a draft PR from git diff
Debug a bug from an entrypoint or symptom, prove root cause, propose a minimal patch
Group current changes into multiple commitlint-compliant commits and apply on confirmation