xiaohongshu
xiaohongshu
gof-patterns
Gang of Four design patterns reference. Use this skill when implementing, discussing, or choosing object-oriented design patterns. Auto-activates for architecture decisions, refactoring, and decoupling concerns. Comprehensive coverage of all 23 GoF patterns with pseudocode examples.
Full skill instructions
A comprehensive reference for the Gang of Four design patterns. This skill provides language-agnostic guidance with pseudocode examples that can be translated to any programming language.
This skill automatically activates when you:
| Pattern | Intent | Use When |
|---|---|---|
| Abstract Factory | Create families of related objects | Need platform/theme independence |
| Builder | Construct complex objects step-by-step | Object has many optional parts |
| Factory Method | Let subclasses decide which class to instantiate | Don't know concrete types ahead of time |
| Prototype | Clone existing objects | Object creation is expensive |
| Singleton | Ensure single instance | Need exactly one shared instance |
| Pattern | Intent | Use When |
|---|---|---|
| Adapter | Convert interface to expected interface | Integrating incompatible interfaces |
| Bridge | Separate abstraction from implementation | Need to vary both independently |
| Composite | Treat individual and groups uniformly | Have tree structures |
| Decorator | Add responsibilities dynamically | Need flexible extension |
| Facade | Simplified interface to subsystem | Complex subsystem needs simple API |
| Flyweight | Share common state efficiently | Many similar objects needed |
| Proxy | Control access to object | Need lazy loading, access control, logging |
| Pattern | Intent | Use When |
|---|---|---|
| Chain of Responsibility | Pass request along handler chain | Multiple handlers, unknown which handles |
| Command | Encapsulate request as object | Need undo, queue, or log operations |
| Interpreter | Define grammar and interpret sentences | Have a simple language to parse |
| Iterator | Sequential access without exposing internals | Need to traverse collections |
| Mediator | Centralize complex communications | Many objects communicate in complex ways |
| Memento | Capture and restore object state | Need undo/snapshot functionality |
| Observer | Notify dependents of state changes | One-to-many dependency |
| State | Alter behavior when state changes | Object behavior depends on state |
| Strategy | Encapsulate interchangeable algorithms | Need to swap algorithms at runtime |
| Template Method | Define skeleton, let subclasses fill in | Algorithm structure fixed, steps vary |
| Visitor | Add operations without changing classes | Need to add many operations to stable structure |
See Pattern Selection Guide for help choosing the right pattern.
The pseudocode in this reference uses these conventions:
class for type definitionsfunction for methods/functions-> for method calls on objects// for commentsname: TypeTranslate to your language:
class, function, ->, //, type hints in docblocks or PHP 8+class, function/arrow, ., //, TS typesclass, def, ., #, type hintsnew, genericsBased on concepts from "Design Patterns: Elements of Reusable Object-Oriented Software" by Gamma, Helm, Johnson, and Vlissides (Gang of Four), 1994.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience