← ClaudeAtlas

refactorlisted

Intelligent refactoring with codebase awareness, test verification, and step-by-step execution.
UtsavBalar1231/oh-my-claudeagent · ★ 1 · AI & Automation · score 73
Install: claude install-skill UtsavBalar1231/oh-my-claudeagent
# Intelligent Refactor ## Usage ``` /refactor <refactoring-target> [--scope=<file|module|project>] [--strategy=<safe|aggressive>] Arguments: refactoring-target: What to refactor. Can be: - File path: src/auth/handler.ts - Symbol name: "AuthService class" - Pattern: "all functions using deprecated API" - Description: "extract validation logic into separate module" Options: --scope: Refactoring scope (default: module) - file: Single file only - module: Module/directory scope - project: Entire codebase --strategy: Risk tolerance (default: safe) - safe: Conservative, maximum test coverage required - aggressive: Allow broader changes with adequate coverage ``` Deterministic refactoring with codebase awareness: understand intent, map codebase, assess risk, plan via prometheus, execute with ast-grep MCP tools, verify after each change. ## PHASE 0: INTENT GATE Classify and validate before acting. | Signal | Classification | Action | |--------|----------------|--------| | Specific file/symbol | Explicit | Proceed to codebase analysis | | "Refactor X to Y" | Clear transformation | Proceed to codebase analysis | | "Improve", "Clean up" | Open-ended | **MUST ask**: "What specific improvement?" | | Ambiguous scope | Uncertain | **MUST ask**: "Which modules/files?" | ## PHASE 1: CODEBASE ANALYSIS ### Parallel Explore Agents ``` // Agent 1: Find the refactoring target Agent(subagent_type="oh-my-claudeagent:explore", prompt="Find all occu