gof-patterns

Guide Gang of Four design pattern selection with decision guides and pseudocode.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/fuxiang123/unity-harness --skill gof-patterns-fuxiang123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gof-patterns
Source: https://github.com/fuxiang123/unity-harness/tree/main/assets/github/skills/software-patterns/references/gof-patterns
Command: npx skills add https://github.com/fuxiang123/unity-harness --skill gof-patterns-fuxiang123

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

A language-agnostic, concentrated reference that removes uncertainty when choosing, applying, or teaching object-oriented design patterns. It helps teams make consistent architecture decisions, refactor for decoupling, and translate classical patterns into practical implementations with clear trade-offs.

Core Features & Use Cases

  • Comprehensive coverage of all 23 Gang of Four patterns with intents, structure, consequences, and implementation notes.
  • Decision guide and quick mappings to help select patterns for object creation, composition, and behavioral change.
  • Pseudocode examples and real-world scenarios that can be translated to languages like C#, Java, Python, JavaScript, and PHP.
  • Pattern combinations and anti-patterns to support architecture-level choices, refactoring sessions, code reviews, and educational use.

Quick Start

Ask the skill to recommend the most appropriate GoF pattern for your architecture problem and describe the context, constraints, and desired trade-offs.

Frequently Asked Questions about gof-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right design pattern for object creation, composition, or behavioral changes?

To choose a design pattern, use a decision guide and quick mappings that evaluate your architecture problem context, constraints, and desired trade-offs. This approach matches your specific object creation, composition, or behavioral change needs to the appropriate pattern.

What are the benefits and liabilities of applying Gang of Four patterns during architecture refactoring?

The benefits and liabilities of Gang of Four patterns include structured decoupling and consistent architecture decisions, balanced against potential complexity or over-engineering. Evaluating these consequences supports effective architecture refactoring and code reviews.

Can I translate design pattern pseudocode examples into language-specific implementations for Java, Python, or JavaScript?

Yes, you can translate design pattern pseudocode examples into language-specific implementations for Java, Python, JavaScript, C#, and PHP. The pseudocode demonstrates real-world scenarios adaptable to your target object-oriented programming language.

What is the best way to use pattern combinations and avoid anti-patterns in object-oriented design reviews?

The best way to use pattern combinations and avoid anti-patterns is by referencing pattern intents and structure diagrams during design reviews. This ensures architecture-level choices support decoupling and prevents structural pitfalls in object-oriented design.

When should I not use GoF design patterns for my software architecture decisions?

You should not use GoF design patterns when their liabilities, such as unnecessary complexity for simple logic, outweigh their decoupling benefits. Pattern selection should carefully map to your specific constraints to avoid forced architecture decisions.

Does the GoF patterns reference cover all 23 original object-oriented design patterns?

Yes, the GoF patterns reference provides comprehensive coverage of all 23 original Gang of Four object-oriented design patterns. It includes intents, structure diagrams, consequences, and implementation notes to support pattern selection and teaching.