What problem does it solve? Refactoring working code is risky: cleanups often change behavior silently, add mechanism instead of removing it, or touch generated files and shipped API fields that must never be edited. This Skill provides a disciplined, measurement-driven process for cleaning up Go code in the simplyblock Kubernetes repository without changing what it does. ## Core Features & Use Cases - Behavior and mechanism gates: Runs the test suite before editing, then compares baseline and post-cleanup metrics (function length, nesting, duplication, hand-rolled primitives) via scripts/measure.sh so reductions are proven, not claimed. - Nine ordered cleanup passes: Dead code, comments, atlas-lib modernization, deduplication, complexity, function sizing, restructuring, pattern unification, and constants, each with preserve-lists and known failure modes. - Duplication and hand-rolled primitive detection: scripts/find-twins.sh finds identical function bodies across the operator and CSI driver and flags places where atlas-lib primitives were rewritten by hand. - Use Case: Ask to simplify a 180-line controller function; the Skill locks behavior with tests, applies guard-clause flattening and extraction, verifies generated manifests are unchanged, and reports measured before/after metrics. ## Quick Start Ask the assistant to clean up and simplify the functions in operator/internal/controller using the code-cleanup skill, keeping behavior unchanged.