What problem does it solve?
This Skill diagnoses structural code smells and refactors code to apply appropriate design patterns, reducing duplication, splitting responsibilities, and improving maintainability across frontend and backend parts of a monorepo.
Core Features & Use Cases
- Smell identification: Detects duplicated conditionals, god services, mixed concerns, hidden coupling, and repeated validation or presentation logic.
- Pattern-guided refactors: Recommends and implements Strategy, Facade, Observer, Custom Hook, Extract Shared Method, Container/Presenter, Factory/Builder, and Decorator patterns with concrete before/after TypeScript examples.
- Practical outputs: Produces full working TypeScript snippets, file paths to add, and notes on project conventions to preserve (error handling, DI, naming).
- Use case: Hand this Skill a long NestJS service or a stateful React component and receive a clear diagnosis plus a minimal, safe refactor that preserves behavior.
Quick Start
Analyze the following TypeScript/NestJS code, identify the primary code smell, and produce a concrete before/after refactor using the simplest appropriate design pattern.