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.

referenceslenses02-naming.md

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

Lens: Naming

Names that force you to read the implementation to understand what the code does — or worse, names that mislead you about what it does.

The Question

Could someone unfamiliar with this code understand what each function, variable, and class does from its name alone?

How to Spot

  • Names that describe mechanism instead of intent: processData when it really validates, handle when it really transforms
  • Sibling names that blur distinctions: functions that do different things but whose names don't communicate how they differ
  • Names that lie: the code evolved but the name didn't, so it now promises something it doesn't deliver
  • Generic containers: -Manager, -Utils, -Helper, data, info, result — concepts hiding behind vague labels

Process

Read names as if you're new to this codebase. For each name that makes you look at the implementation, ask: what would I call this if I were explaining it to someone? That's the name it should have.

For sibling functions, line up their names and ask: can I tell them apart? If not, what's the actual distinction? Name each after the specific thing that makes it different from its siblings. Use one verb for one concept — if parse, fetch, and get all mean the same operation, pick one and use it everywhere.

Trade-off

Not every name needs to be long or elaborate. Short names are fine in small scopes — i, e, ctx carry meaning through convention. Names inside a class don't need to repeat the class name (cart.getCartItems() → cart.items()). And don't rename something you don't fully understand — a confidently wrong name is worse than a vague one. When naming is hard, that's often a design problem surfacing, not just a vocabulary problem.

Go Deeper

Where do test names describe operations instead of behaviors — what would a failing test tell you? Where do noise-word suffixes create phantom distinctions (Product vs ProductInfo vs ProductData)? Where would you use a different word than the code uses if you were explaining it out loud?

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