← ClaudeAtlas

refactorlisted

Plans and executes a refactoring with safety checks by delegating to the planner and code-reviewer agents, then iterating implementation + review up to three rounds. Use when (1) the user runs `/refactor {target}` directly to refactor a specific function, file, or pattern, (2) refactoring is invoked inside a ticket workflow with `ticket-dir={dir-name}` so the review artifact lands at `{ticket-dir}/quality-refactor-{n}.md`, or (3) the user wants the refactor protected by a `backup/pre-refactor-{timestamp}` branch and a bounded review loop. Use only when the user explicitly asks to refactor code. Triggers on "/refactor", "refactor code", "restructure", "extract method", "rename", "clean up".
aimsise/simple-workflow · ★ 1 · Code & Development · score 73
Install: claude install-skill aimsise/simple-workflow
Plan and execute refactoring: $ARGUMENTS ## Pre-computed Context Available user skills: !`( ls -1 ~/.claude/skills 2>/dev/null ; ls -1 .claude/skills 2>/dev/null ) | sort -u | grep . | tr "\n" "," | sed "s/,$//" | grep . || echo "(none)"` Available MCP servers: !`( jq -r '.mcpServers // {} | keys[]' .mcp.json 2>/dev/null ; jq -r '.mcpServers // {} | keys[]' ~/.claude.json 2>/dev/null ) | sort -u | grep . | tr "\n" "," | sed "s/,$//" | grep . || echo "(none)"` ## Argument Parsing Parse `$ARGUMENTS` for the following: - `ticket-dir=<dir-name>` (case-insensitive key): Optional ticket directory name (directory name only, not a full path — e.g., `003-fix-login`). When provided, this value is used in Step 1b to construct the full path `.simple-workflow/backlog/active/{dir-name}` instead of inferring the ticket directory from the branch name. - All other tokens are treated as the refactoring target and goal description. Current state: !`git status --short` !`git diff --stat` Current branch: !`git branch --show-current` Active tickets: !`ls -d .simple-workflow/backlog/active/*/ 2>/dev/null || echo "(none)"` Invocation policy: Do not auto-invoke. `disable-model-invocation: true` is intentional because `/refactor` performs destructive changes (file edits, possible structural moves) and creates a `backup/pre-refactor-{timestamp}` branch as the only rollback point. The safety design assumes the user has made an explicit decision to refactor; chain-call from another skill is not