output_skills/ai/claude-code/refactoring-team/SKILL.md
Iterative code refactoring through progressive lenses via a worker-reviewer agent team.
npx skillsauth add lexler/skill-factory refactoring-teamInstall 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.
STARTER_CHARACTER = 💎
Agent teams must be enabled in settings:
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
If not set, offer to add it before proceeding.
If $ARGUMENTS provided, use as target path. Otherwise ask for:
Verify the target path exists and tests pass before proceeding.
Generate a short random ID: head -c 3 /dev/urandom | xxd -p | head -c 3
Use it to name the teammates:
worker-ID (e.g. worker-a3f)reviewer-ID (e.g. reviewer-a3f)Read the spawn prompts:
Before spawning, replace these placeholders in both prompts:
TARGET_PATH → actual target pathTEST_COMMAND → actual test commandLENSES_DIR → ${CLAUDE_SKILL_DIR}/references/lensesGUIDES_DIR → ${CLAUDE_SKILL_DIR}/references/reviewer-guidesWORKER_NAME → the worker's name (e.g. worker-a3f)REVIEWER_NAME → the reviewer's name (e.g. reviewer-a3f)Tell the user:
teammateMode: "tmux" in settingsWhen a worker goes idle, read .refactoring-state to check the lens number. If it skipped a value, message the reviewer to go back and complete the skipped lens first.
development
Test-driven development (TDD) process used when writing code. Use whenever you are adding any new code, unless the user explicitly asks to skip TDD or the code is exploratory/spike.
development
Writes tests without mocks using Nullables. Use when writing tests, especially testing code with external I/O (HTTP, files, databases, clocks, random numbers), designing infrastructure wrappers or replacing mocking libraries.
testing
Scannable BDD tests written in domain language. Use when doing BDD.
development
Writes approval tests (snapshot/golden master testing) for Python, JavaScript/TypeScript, or Java. Use when verifying complex output, characterization testing legacy code, testing combinations, or working with .approved/.received files.