with one click
refactor
Refactor code while preserving behavior and reducing structural risk.
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
Refactor code while preserving behavior and reducing structural risk.
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
Guided git commit workflow — review changes, draft message, stage, commit
Manage context pressure during large codebase work without losing critical state.
Create a pull request with structured summary and test plan
Interactive debugging — reproduce, isolate, trace, fix
Explore a codebase or directory to understand its structure and purpose
Implement a requested code change end-to-end with scoped edits and verification.
| name | refactor |
| description | Refactor code while preserving behavior and reducing structural risk. |
| when_to_use | Use when the user asks for restructuring, cleanup, simplification, or architecture improvement. |
| required_tools | ["bash","symbol_index","symbol_search","imports"] |
| tags | ["coding","refactor"] |
| activation | {"input_patterns":["(?i)(refactor|restructure|cleanup|重构|整理|架构)"]} |
${ARGS}
Define the behavior that must not change. Locate callers before moving or renaming symbols.
Prefer reducing coupling, narrowing responsibilities, and deleting dead paths over adding abstraction.
Make small coherent edits. Keep public interfaces stable unless the user explicitly asks for a break.
Run targeted diagnostics/tests and inspect the resulting diff for accidental behavior change.