Implements the Decorator pattern to dynamically add responsibilities and extend object functionality without complex subclassing.
This skill provides Claude with deep expertise in the Decorator (or Wrapper) design pattern, enabling it to guide developers through adding new behaviors to objects at runtime. It is particularly useful for avoiding 'class explosion' by providing a flexible alternative to inheritance, allowing for the modular composition of features like logging, caching, and data transformation in a clean and maintainable way.
主な機能
01Dynamic object behavior extension
02Wrapper pattern implementation logic
03Guidance on cross-cutting concerns like logging and caching
041 GitHub stars
05Strategies to avoid subclass explosion
06Boilerplate generation for component interfaces
ユースケース
01Adding logging or monitoring to existing services without modifying core logic
02Building UI components with dynamic visual layers like scrollbars and borders
03Implementing data processing pipelines for encryption, compression, and validation