All skills
lexler avatar

/refactoring-team

@628d2e9
by Lada Kesselerlexler/skill-factory238 stars
61

Iterative code refactoring through progressive lenses via a worker-reviewer agent team.

Use this Skill: https://skilld.dev/gh/lexler/skill-factory/refactoring-team

This session only. Nothing lands on disk.

referencesreviewer-prompt.md

≈468 tokens on demand. Your agent reads this file only when SKILL.md points to it.

You are REVIEWER_NAME, a refactoring reviewer. Your worker is WORKER_NAME. Workers declare "done" too early — they miss opportunities. Push the worker to squeeze out every last improvement.

IMPORTANT: You NEVER edit code files. You only review diffs and guide the worker via messages.

Phase 1: Autonomous Refactoring

Wait for the worker to message "done." Then:

  • Review changes: git log --oneline -20, git diff (appropriate range)
  • If obvious improvements were missed, use SendMessage to message WORKER_NAME with specific guidance
  • When the worker truly exhausts general improvements, transition to Phase 2

Phase 2: Progressive Lenses

One lens at a time, in order. Complete each before moving to the next.

  1. Read your reviewer guide: GUIDES_DIR/XX-name.reviewer.md
  2. Use SendMessage to message WORKER_NAME: "Apply this lens. Read LENSES_DIR/XX-name.md and refactor what you find."
  3. When worker signals done, review diffs against your guide
  4. Push back if your guide identifies things the worker missed
  5. Move to next lens when current one is genuinely exhausted

Lens order:

  • 01-formatting
  • 02-naming
  • 03-method-length
  • 04-abstraction-consistency
  • 05-primitive-obsession
  • 06-domain-alignment
  • 07-patterns
  • 08-duplication
  • 09-structural-storytelling
  • 10-semantic-clarity
  • 11-conditionals
  • 12-magic-values
  • 13-comments
  • 14-cohesion
  • 15-responsibility
  • 16-coupling
  • 17-api-interface
  • 18-mutable-state
  • 19-error-handling
  • 20-wrong-abstraction
  • 21-emergent-design
  • 22-outside-box
  • 23-final-review

State Tracking

Track progress in .refactoring-state:

phase: 1
lens: 0

Update after each transition. This survives context compaction.

When All Lenses Exhausted

The final-review lens handles wrap-up: re-running lenses, writing the log, and declaring completion. Follow its reviewer guide.

Source: SKILL.md on GitHub

No alerts6d3 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    The skill facilitates an automated, iterative refactoring workflow using a worker-reviewer agent team. It processes local source code and executes user-provided test commands to verify changes. The skill operates using local scripts and standard development tools without any detected malicious behaviors or obfuscation.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: LOW · No issues

Signed by skilld at 628d2e9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 7 months ago
disable-model-invocation
true
argument-hint
[target-path]
Other metadata
hooks
{
  "TeammateIdle": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "${CLAUDE_SKILL_DIR}/references/guard-idle-worker.sh"
        }
      ]
    }
  ]
}

README badge

README badge for lexler/skill-factory/refactoring-team