Refactoring team

From lexler/skill-factory · View interactive version

Refactoring team is an AI agent skill from the GitHub repository lexler/skill-factory. Iterative code refactoring through progressive lenses via a worker-reviewer agent team.

How to use this skill

Skill file

STARTER_CHARACTER = 💎

Prerequisites

Agent teams must be enabled in settings:

{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

If not set, offer to add it before proceeding.

Setup

If $ARGUMENTS provided, use as target path. Otherwise ask for:

Verify the target path exists and tests pass before proceeding.

Launch the Team

Generate a short random ID: head -c 3 /dev/urandom | xxd -p | head -c 3

Use it to name the teammates:

Read the spawn prompts:

Before spawning, replace these placeholders in both prompts:

After Launch

Tell the user:

Monitor Progress

When 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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.