代碼質素
Code Smell Doctor
Analyze code for the 23 classic code smells. Use when asked to:
review code quality, find code smells, detect anti-patterns, identify refactoring opportunities,
audit code for maintainability issues, or when phrases like "smell", "code quality",
"refactor", "clean up", "technical debt" appear. Covers 5 categories: Bloaters (Long Method,
Large Class, Primitive Obsession, Long Parameter List, Data Clumps), Object-Orientation Abusers
(Alternative Classes with Different Interfaces, Refused Bequest, Switch Statements, Temporary Field),
Change Preventers (Divergent Change, Parallel Inheritance Hierarchies, Shotgun Surgery),
Dispensables (Comments, Duplicate Code, Data Class, Dead Code, Lazy Class, Speculative Generality),
and Couplers (Feature Envy, Inappropriate Intimacy, Incomplete Library Class, Message Chains, Middle Man).