refactoring-team
Iterative code refactoring through progressive lenses via a worker-reviewer agent team.
适合你,如果需要自动化的代码重构并有代码审查流程。
npx oh-my-skill add lexler/skill-factory/refactoring-teamcurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- lexler/skill-factory/refactoring-teamnpx oh-my-skill verify lexler/skill-factory/refactoring-team怎么用
商店整理自技能原文 · 版本 2eae60e · 表述以原文为准Claude会创建一个工人代理和一个审查者代理,对指定代码文件进行逐步重构。工人执行修改,审查者验证,循环进行直到完成。
当你提供目标文件路径和测试命令,或要求Claude重构代码时,Claude会启动工人和审查者代理团队进行迭代重构。
技能原文 SKILL.md
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:
- Target path (files or folder to refactor)
- Test command to verify changes
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:
- Worker:
worker-ID(e.g.worker-a3f) - Reviewer:
reviewer-ID(e.g.reviewer-a3f)
Read the spawn prompts:
- Worker: [references/worker-prompt.md](references/worker-prompt.md)
- Reviewer: [references/reviewer-prompt.md](references/reviewer-prompt.md)
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)
After Launch
Tell the user:
- Shift+Down cycles between worker and reviewer
- For split panes: set
teammateMode: "tmux"in settings
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.