com um clique
refactor
Analyze and refactor a file or system with before/after comparison.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Analyze and refactor a file or system with before/after comparison.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
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.
Baseado na classificação ocupacional SOC
| 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: