skills/utils-refactor/SKILL.md
Refactor code across the codebase using parallel Snipper agents. Use when user wants to rename methods, update patterns, fix code smells, or apply consistent changes across multiple files.
npx skillsauth add devattom/.claude refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Refactor code matching $ARGUMENTS across the codebase using parallel Snipper agents for maximum speed.
Parse the refactor request from $ARGUMENTS
Find all affected files
Create task folder: .claude/tasks/refactor-{timestamp}/
Create ONE instruction file at instructions.md:
# Refactor: {title}
## Objective
{What to refactor - derived from $ARGUMENTS}
## Pattern to Find
{Exact code pattern or structure to locate}
## Transformation
{How to transform - be specific and adaptive}
## Examples
Before:
{current code}
After:
{refactored code}
## Constraints
- Only modify code matching the pattern
- Preserve all existing functionality
- Follow codebase conventions
Group files into batches of max 3 files each
Launch Snipper agents in parallel - ALL batches in a SINGLE message:
Using instructions in .claude/tasks/refactor-{id}/instructions.md, refactor:
- {file_1}
- {file_2}
- {file_3}
Read instructions first, then apply the refactor to each file.
Validate changes
pnpm lint (if available)pnpm tsc (if TypeScript)Report summary
User: /refactor rename getUserData to fetchUserProfile
.claude/tasks/refactor-1702489200/instructions.mddevelopment
Use when you want to audit a project wiki for quality issues — stale version claims, contradictions between pages, orphan pages, broken wiki links, missing cross-references, or misalignment between wiki content and the actual codebase state.
development
Systematic error debugging with analysis, solution discovery, and verification
development
Structured adversarial debate between AI councillors using Agent Teams to evaluate ideas, plans, or decisions. ALWAYS use when the user says "council", "debate this", "evaluate this idea", "challenge my plan", "stress-test", "devil's advocate", "multiple perspectives", "évaluer cette idée", "débattre", "challenger mon plan", "tester cette décision", or when the user wants rigorous multi-perspective analysis of a proposal, architecture decision, or strategic choice. Each councillor (visionary, critic, pragmatist, innovator, ethicist, domain expert) represents a distinct perspective and they challenge each other through cross-examination and peer exchange, producing a nuanced verdict (PROCEED / PROCEED WITH CONDITIONS / RECONSIDER / DO NOT PROCEED). Do NOT use for divergent brainstorming or idea generation — use workflow-brainstorm instead.
testing
Automated CI/CD pipeline fixer - watches CI, fixes errors locally, commits, and loops until green. Use when CI is failing and you want to automatically fix and verify changes.