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.

referenceslenses05-primitive-obsession.md

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

Lens: Primitive Obsession

Domain concepts hiding as raw data — strings, tuples, and dicts carrying meaning the type system doesn't capture.

The Question

What domain concepts in this code exist only as primitives?

How to Spot

  • Values that travel together: the same two or three primitives passed as a group between functions, unpacked the same way each time
  • Strings carrying structure: values split, joined, parsed, or validated in consistent patterns — a format hiding inside a string
  • Scattered parsing: the same guard clause, validation, or string-splitting logic repeated across multiple locations
  • Type signatures that lie: a function accepts str or dict but only works correctly with a specific format or set of keys

Process

Describe the code to someone in domain language. Every noun you use that doesn't exist as a type in the code is a missing concept. The gap between how you talk about the code and what the type system captures is where the primitives are hiding.

Trade-off

Not every primitive needs a type. Act when parsing or validation is duplicated, when values always travel together, or when bugs come from confusing one value for another. Leave primitives alone when the concept is purely local and has no rules or behavior worth naming.

Go Deeper

Where are intermediate representations missing — raw strings flowing end-to-end because nothing ever parses them into structured form? What values always travel together but get passed as separate arguments? Which functions silently assume a string has a specific format without the type making that guarantee visible?

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