From playbooks-virtuoso
Provides PHP 8.3+ implementations, UML guidance, real-world examples, trade-offs, and anti-patterns for 26 Gang of Four design patterns. Activates for applying patterns, refactoring code, selecting patterns, or reviewing usage.
npx claudepluginhub krzysztofsurdy/code-virtuoso --plugin playbooks-virtuosoThis skill is limited to using the following tools:
A thorough reference covering 26 design patterns organized by intent — creational, structural, and behavioral — featuring PHP 8.3+ implementations, UML guidance, and practical use cases.
references/abstract-factory.mdreferences/adapter.mdreferences/bridge.mdreferences/builder.mdreferences/chain-of-responsibility.mdreferences/command.mdreferences/composite.mdreferences/decorator.mdreferences/facade.mdreferences/factory-method.mdreferences/flyweight.mdreferences/interpreter.mdreferences/iterator.mdreferences/mediator.mdreferences/memento.mdreferences/null-object.mdreferences/object-pool.mdreferences/observer.mdreferences/private-class-data.mdreferences/prototype.mdConsults design pattern catalog before implementing or refactoring code to check for matching patterns and follow established implementations.
Applies PHP design patterns including Repository, Factory, Strategy, Decorator, Observer, Singleton, Builder, Proxy, Composite, and DI. For PHP apps and Magento.
Applies design patterns (Singleton, Factory, Observer, Strategy, etc.) to refactor code architecture, implement extensible systems, and follow SOLID principles.
Share bugs, ideas, or general feedback.
A thorough reference covering 26 design patterns organized by intent — creational, structural, and behavioral — featuring PHP 8.3+ implementations, UML guidance, and practical use cases.
| Problem | Pattern |
|---|---|
| Need to create families of related objects | Abstract Factory |
| Complex object construction with many options | Builder |
| Want to defer instantiation to subclasses | Factory Method |
| Need copies of complex objects | Prototype |
| Need exactly one instance globally | Singleton |
| Incompatible interfaces need to work together | Adapter |
| Want to vary abstraction and implementation independently | Bridge |
| Tree structures with uniform treatment | Composite |
| Add responsibilities dynamically without subclassing | Decorator |
| Simplify a complex subsystem interface | Facade |
| Many similar objects consuming too much memory | Flyweight |
| Control access, add lazy loading, or log access | Proxy |
| Multiple handlers for a request, unknown which handles it | Chain of Responsibility |
| Queue, log, or undo operations | Command |
| Need to interpret a simple language/grammar | Interpreter |
| Traverse a collection without exposing internals | Iterator |
| Reduce coupling between many communicating objects | Mediator |
| Need undo/snapshot capability | Memento |
| One-to-many event notification | Observer |
| Object behavior depends on its state | State |
| Need to switch algorithms at runtime | Strategy |
| Algorithm skeleton with customizable steps | Template Method |
| Add operations to object structures without modification | Visitor |