بنقرة واحدة
refactor
Propose minimal, safe code improvements without changing behavior
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Propose minimal, safe code improvements without changing behavior
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| 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