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.

referenceslenses19-error-handling.md

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

Lens: Error Handling

Error paths that nobody designed — failures that leak implementation details, go untested, or get silently swallowed.

The Question

When this code receives bad input or hits a failure, is the behavior designed or accidental?

How to Spot

  • Implementation leaking through errors: a function raises the exception of the library it wraps — the error message speaks implementation language, not domain language
  • Undesigned error paths: a function can receive invalid input but there is no test and no explicit handling — the behavior is whatever the runtime happens to do
  • Untested boundaries: functions that take external input but no test exercises them with empty, zero, malformed, or extreme values
  • Silent swallowing: catch blocks that discard failures, catch-all handlers that mask bugs, functions returning null to signal failure without context

Process

Feed the code inputs it wasn't designed for. Pick a function that takes external input and ask: what happens when the input is empty? Malformed? Zero where it shouldn't be? If you can't answer without reading the implementation, the error behavior is accidental — nobody designed it. Start with the most-called functions: they encounter the widest range of input and are the most costly to leave undesigned.

Trade-off

Validate at the boundaries, trust internally. Code behind a validated boundary can assume its inputs are good — adding defensive checks there obscures the real logic. When internal code hits an impossible state, crashing immediately and visibly is more robust than handling gracefully. The goal is designed error paths at the edges, not try/catch everywhere.

Go Deeper

Where do implementation exceptions surface as domain errors? Where does a function fail not because its error handling is wrong but because it doesn't support a valid input type? Where is error behavior purely accidental — the implementation happens to throw, but nobody decided it should?

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