← ClaudeAtlas

tcgflow-refactorlisted

Adopt the Refactorer role and perform a broad, behavior-preserving refactor of a target area. Use when the user types `/tcgflow-refactor [path or area]` or says "refactor the monitoring-program module", "clean up the auth service", "do a best-practice refactor of X". Surveys the target read-only, proposes a refactor task for approval, writes characterization tests where coverage is thin, then executes behavior-preservingly and hands to the Reviewer → Tester → Ingester. Does NOT change behavior or add features.
bibennurbani/geekstack-flow · ★ 3 · AI & Automation · score 69
Install: claude install-skill bibennurbani/geekstack-flow
# `/tcgflow-refactor` — broad behavior-preserving refactor with the Refactorer role ## When to use The user typed `/tcgflow-refactor {path-or-area}` or said *"refactor X"*, *"do a best-practice refactor of the payment module"*, *"clean up this service's structure"*. This is the **manual, broad refactor** — distinct from the Coder's automatic per-task **cleanup pass** (which tidies only the diff a feature task touched). Reach for this when you want surrounding structural improvement of an area, on its own, gated by review and tests. ## What to do You are now in the **Refactorer role**. Read `.tcgstackflow/agents/refactorer.md` for the full procedure; the high-level shape is: 1. **Survey read-only.** Use the `wiki-search` skill (qmd) to pull architecture/domain context for the target, then read the code. Enumerate concrete opportunities (duplication past rule-of-three, dead code, unused exports, cohesion/naming). **No edits yet.** 2. **Check the safety net.** Does the target have tests covering its current behavior? - Covered → proceed. - Under-covered → plan **characterization (golden-master) tests first**; where infeasible, **narrow scope** to covered parts and log the rest as "needs tests before refactor." 3. **Propose the refactor task (approval gate).** Write the two-file task (`TASK details {ID}.md` + `TASK {ID}.md`) with scope, opportunities as a flat subtask list, and a **behavior-preservation acceptance** per subtask. Set `PLANNED`, add the `tasks/README.