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-guides03-method-length.reviewer.md

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

Lens: Method Length (Reviewer Guide)

When to Apply

After naming. Easier to see function boundaries when names already communicate well.

What to Look For in Diffs

  • Functions extracted with names describing WHAT, not HOW
  • Inline code paragraphs replaced by named calls at a consistent abstraction level
  • Long functions split along natural seams (blank lines, comments, phase boundaries)

First Pass

Worker should find functions with visible paragraphs, comments acting as section headers, and mixed abstraction levels.

Check for false positives: if the worker split a flat sequence of steps all at the same abstraction level, push back — that was a coherent story, not a smell. If extracted methods have mechanism names (parseAndValidate, loopThroughItems), the names need work — they should describe intent.

Second Pass

Do the name-vs-body test yourself: read a function's name, then its body. Where the body surprises you with work the name didn't promise, the worker missed an extraction.

Then look for what the worker missed:

  • Functions that mix computation with I/O or formatting — always separable
  • Sibling functions handling the same pattern at inconsistent depths (one recurses, another doesn't)
  • Test methods with multiple act-assert cycles — each cycle should be its own test

Check for wrong fixes: pass-through methods that just delegate to another method with the same signature are indirection, not extraction. If an extracted method only makes sense when you also read the caller, the cut was in the wrong place.

When Done

Move on when each function's name honestly describes what its body does, and the body works at one level of abstraction.

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