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-guides11-conditionals.reviewer.md

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

Lens: Conditionals & Boolean Logic (Reviewer Guide)

When to Apply

After semantic clarity. Now that the code tells its story, look at branching logic — is the main path visible, or buried under conditions?

What to Look For in Diffs

  • Nested if/else flattened into guard clauses with early returns
  • Complex boolean expressions extracted into named variables or predicate functions
  • Multiple conditions with the same outcome consolidated into one named check
  • Type-switching replaced with lookup tables or maps

First Pass

Worker should find the obvious: deep nesting that can be flattened with guard clauses, unnamed boolean expressions, repeated null checks.

Check for false positives: if the worker converted symmetric branches into guard clauses, push back — if/else communicates that both paths are equally important. If the worker named a boolean that's no clearer than the expression (isCountPositive for count > 0), the name should say more than the code already does. If the worker added 7+ guard clauses, the function does too much — it needs splitting, not more guards.

Second Pass

Do the main-path test yourself: pick a function and find what it normally does without reading every branch. Then look for what the worker missed:

  • Boolean expressions left inline that have a name in the domain
  • The same switching pattern in multiple places — the signal for polymorphism
  • Guards that could be consolidated — three guards returning the same thing are one concept
  • Boolean combinations encoding hidden states — flags checked together are a state machine

Check for wrong fixes: premature polymorphism for a one-off conditional (a lookup table is simpler), Null Objects swallowing errors that should surface, or null checks deep in domain code (fix the boundary or type, not the symptom).

When Done

Move on when the main path is visible at a glance and branching logic is as simple as it can be.

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