Help us improve
Share bugs, ideas, or general feedback.
From playbooks-virtuoso
Covers 26 Gang of Four design patterns with PHP 8.3+ implementations, UML diagrams, and practical use cases.
npx claudepluginhub krzysztofsurdy/code-virtuoso --plugin agents-virtuosoHow this skill is triggered — by the user, by Claude, or both
Slash command
/playbooks-virtuoso:design-patternsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.mdGang of Four patterns (Creational, Structural, Behavioral) and when to apply them.
Consults 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.
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 |