refactorlisted
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