What problem does it solve? Python codebases accumulate structural debt over time: duplicated logic, oversized files, business logic tangled in views, and missing type hints. This Skill restructures modules, services, and scripts into cleaner, modular, testable code while preserving existing behavior and API contracts. ## Core Features & Use Cases - Structured Refactoring Workflow: Analyzes existing code for duplication, side effects, and async/sync mixing, then applies minimal safe transformations such as extracting functions, splitting files, and adding service layers. - Behavior Preservation: Enforces guardrails against breaking API changes, unnecessary dependencies, and unrequested behavior changes, with before/after diff summaries. - Use Case: Given a Django view containing direct database calls, the Skill extracts a service layer (e.g., a PlayerService class), converts to async where appropriate, adds type hints, and leaves the view as a thin wrapper. ## Quick Start Refactor this Python service module to be more modular and testable without changing its public API.