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.

referenceslenses20-wrong-abstraction.md

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

Lens: Wrong Abstraction

An abstraction that makes change harder than duplication would. DRY applied too eagerly, producing conditionals and parameter threading to handle callers that have diverged.

The Question

Is any abstraction in this code fighting its callers? Would duplication actually be simpler?

How to Spot

  • A shared function or class that has grown if-branches or config parameters to handle different callers
  • An abstraction where every new use case requires adding a flag or option
  • Callers that work around an abstraction rather than through it
  • Inheritance where subclasses override most of what the parent does
  • Code that was deduplicated but is now harder to understand than the original repetition

Process

For each abstraction that feels strained:

  1. Count the conditionals and parameters that exist only to serve different callers
  2. Ask: if I inlined this back into each call site, would each site become simpler?
  3. If yes, back out the abstraction — reintroduce duplication, then look for the real commonality

Trade-off

This lens is the counterbalance to the duplication lens. Duplication says "merge these." This lens says "not if merging makes both worse." The right abstraction simplifies every caller. The wrong one complicates all of them.

Go Deeper

What other abstractions are under strain? Where is shared code accumulating flags to serve divergent needs?

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