원클릭으로
refactor
Analyze and refactor a file or system with before/after comparison.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze and refactor a file or system with before/after comparison.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Rapid prototyping workflow for Unity. Quickly validates a mechanic or concept with throwaway code and a structured report.
Load a saved plan from ProjectSettings/GameDeck/plans/ and execute it step-by-step.
Save a plan to ProjectSettings/GameDeck/plans/ — captures the most recent plan from this conversation, or a plan you provide directly.
Plan a feature implementation with tasks, architecture, and file list.
Generate a complete Unity system — MonoBehaviour + ScriptableObject config from structured input.
Creates an Architecture Decision Record (ADR) documenting a technical decision, alternatives, and consequences.
| name | refactor |
| description | Analyze and refactor a file or system with before/after comparison. |
| argument-hint | [file-or-system-path] |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Edit, Write |
When this skill is invoked:
Parse the target path from the user's message. If the user wrote
/refactor Assets/Scripts/Combat/DamageSystem.cs, the target is that
file. If a directory was given, treat all scripts in it as the target.
If no path was provided, ask for one.
Ask for the following inputs before doing any analysis:
Wait for the user to answer both before proceeding.
Read the target file(s) in full using the Read tool. Also read:
${CLAUDE_PLUGIN_ROOT}/knowledge/01-unity-project-architecture.md for structure${CLAUDE_PLUGIN_ROOT}/knowledge/03-unity-design-patterns.md for patternsAnalyze the current architecture and identify:
Propose the refactored version with a clear explanation:
## Refactor Plan: [File/System Name]
### Problem
[Summarize what's wrong]
### Constraints
[List what must not change]
### Changes
[For each change]:
- **What**: [description of the change]
- **Why**: [which principle or pattern this fixes]
- **Before**: [relevant code snippet]
- **After**: [proposed code snippet]
### Impact
- Files modified: [list]
- Files created: [list, if extracting new classes]
- Public API changes: [none / list breaking changes]
### Risk
[What could break, what to test after]
Wait for user confirmation before applying any changes. Ask: "Apply these changes? I'll modify the files and you can review the diff. Say 'apply' to proceed or tell me what to adjust."
Apply changes only after the user confirms. Use Edit for surgical changes, Write only for new files. After applying: