一键导入
refactor
Activate when improving code quality, reducing complexity, or aligning code with standards without changing behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Activate when improving code quality, reducing complexity, or aligning code with standards without changing behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Activate when an Engineering Manager needs to shape a rough initiative into a clear, scoped, outcome-oriented brief before execution.
Activate when reviewing branches, commits, or pull requests using the emoji-driven review protocol.
Activate when managing conversation history in long sessions, choosing compression strategies, or preserving critical information during context truncation.
Activate when designing agent systems, debugging unexpected agent behavior, or optimizing context usage and attention budgets.
Activate when hitting context limits, experiencing quality degradation in long sessions, or needing to extend effective context capacity.
Activate when generating in-code comments or system documentation using the Diátaxis framework.
| name | refactor |
| version | 1.0.0 |
| description | Activate when improving code quality, reducing complexity, or aligning code with standards without changing behavior. |
| triggers | ["refactor","cleanup","simplify","extract","rename","complexity"] |
A protocol for safely improving code quality without changing external behavior. Combines recursive tracing with incremental, test-verified transformations.
Before any modification, perform a recursive check:
Systematically apply these transformations:
mixed, any, or loose types with strict types or Value Objects.<thought> block. Explain how it aligns with the recursive-exploration skill.For each refactor step:
Input: A 35-line method with nested conditionals.
Step 1 output:
validateInput()."recursive-exploration (tracing methodology), typescript-standard or php-standard (target standards)code-review (refactor suggestions from reviews)