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-guides15-responsibility.reviewer.md

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

Lens: Responsibility & Type Design (Reviewer Guide)

When to Apply

After cohesion. Units are internally coherent — now check whether logic is in the right unit and whether types carry their own weight.

What to Look For in Diffs

  • Logic moved from services or helpers onto the domain objects that own the data
  • Data classes gaining behavior (methods that enforce invariants or make decisions)
  • Tell-Don't-Ask refactorings: callers asking objects to act instead of querying and deciding
  • Duplicated logic across callers consolidated onto the callee
  • Inheritance replaced with composition where appropriate

First Pass

Worker should find obvious problems: functions that reach heavily into another object's data, anemic types with only getters/setters, domain logic hiding in utility layers.

Second Pass

If misplaced logic or passive types remain:

  • For each function, count whose data it uses most — if it uses another object's data more than its own, the logic likely belongs there
  • Look for decisions made about objects that the objects could make themselves
  • Check constructors — can the type be created in an invalid state?
  • Check for "orchestration" classes that contain business rules instead of just coordinating

Push Back On

  • Moving truly cross-cutting concerns (logging, orchestration, coordination) onto domain objects — those are legitimately separate
  • Over-enriching simple data transfer objects or configuration records — not everything needs behavior

When Done

Move on when logic lives with the data it works with, types enforce their own invariants, and services coordinate rather than compute.

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