gof-patterns — community gof-patterns, software-patterns, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Code Generation Agents needing comprehensive guidance on Gang of Four design patterns Comprehensive GoF design patterns and data structures reference skill for Claude Code

grndlvl grndlvl
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The gof-patterns skill by grndlvl is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Code Generation Agents needing comprehensive guidance on Gang of Four design patterns

Core Value

Empowers agents to implement design patterns with language-agnostic pseudocode examples, facilitating structural improvements and architecture discussions using protocols like decoupling and refactoring

Capabilities Granted for gof-patterns

Implementing Singleton patterns for efficient resource management
Refactoring code using Factory Method patterns for improved modularity
Choosing between Adapter and Bridge patterns for complex system integration

! Prerequisites & Limits

  • Requires programming language knowledge for pseudocode translation
  • Limited to Gang of Four design patterns
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

gof-patterns

Install gof-patterns, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

GoF Design Patterns Reference

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.

When This Skill Activates

This skill automatically activates when you:

  • Ask about or need to implement a design pattern
  • Need to choose between patterns for a design problem
  • Are refactoring code and considering structural improvements
  • Discuss architecture, decoupling, or extensibility
  • Mention specific patterns: factory, singleton, observer, decorator, etc.

Quick Pattern Reference

Creational Patterns (Object Creation)

PatternIntentUse When
Abstract FactoryCreate families of related objectsNeed platform/theme independence
BuilderConstruct complex objects step-by-stepObject has many optional parts
Factory MethodLet subclasses decide which class to instantiateDon't know concrete types ahead of time
PrototypeClone existing objectsObject creation is expensive
SingletonEnsure single instanceNeed exactly one shared instance

Structural Patterns (Composition)

PatternIntentUse When
AdapterConvert interface to expected interfaceIntegrating incompatible interfaces
BridgeSeparate abstraction from implementationNeed to vary both independently
CompositeTreat individual and groups uniformlyHave tree structures
DecoratorAdd responsibilities dynamicallyNeed flexible extension
FacadeSimplified interface to subsystemComplex subsystem needs simple API
FlyweightShare common state efficientlyMany similar objects needed
ProxyControl access to objectNeed lazy loading, access control, logging

Behavioral Patterns (Communication)

PatternIntentUse When
Chain of ResponsibilityPass request along handler chainMultiple handlers, unknown which handles
CommandEncapsulate request as objectNeed undo, queue, or log operations
InterpreterDefine grammar and interpret sentencesHave a simple language to parse
IteratorSequential access without exposing internalsNeed to traverse collections
MediatorCentralize complex communicationsMany objects communicate in complex ways
MementoCapture and restore object stateNeed undo/snapshot functionality
ObserverNotify dependents of state changesOne-to-many dependency
StateAlter behavior when state changesObject behavior depends on state
StrategyEncapsulate interchangeable algorithmsNeed to swap algorithms at runtime
Template MethodDefine skeleton, let subclasses fill inAlgorithm structure fixed, steps vary
VisitorAdd operations without changing classesNeed to add many operations to stable structure

Decision Guide

See Pattern Selection Guide for help choosing the right pattern.

How to Use This Reference

  1. Choosing a pattern: Start with the decision guide or tables above
  2. Learning a pattern: Read the full documentation with examples
  3. Quick reminder: Use the tables above for at-a-glance reference
  4. Implementation: Follow the pseudocode, adapt to your language

Language Translation Notes

The pseudocode in this reference uses these conventions:

  • class for type definitions
  • function for methods/functions
  • -> for method calls on objects
  • // for comments
  • Type hints shown as name: Type

Translate to your language:

  • PHP: class, function, ->, //, type hints in docblocks or PHP 8+
  • JavaScript/TypeScript: class, function/arrow, ., //, TS types
  • Python: class, def, ., #, type hints
  • Java/C#: Direct mapping with new, generics

Based on concepts from "Design Patterns: Elements of Reusable Object-Oriented Software" by Gamma, Helm, Johnson, and Vlissides (Gang of Four), 1994.

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is gof-patterns?

Perfect for Code Generation Agents needing comprehensive guidance on Gang of Four design patterns Comprehensive GoF design patterns and data structures reference skill for Claude Code

How do I install gof-patterns?

Run the command: npx killer-skills add grndlvl/software-patterns/gof-patterns. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for gof-patterns?

Key use cases include: Implementing Singleton patterns for efficient resource management, Refactoring code using Factory Method patterns for improved modularity, Choosing between Adapter and Bridge patterns for complex system integration.

Which IDEs are compatible with gof-patterns?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for gof-patterns?

Requires programming language knowledge for pseudocode translation. Limited to Gang of Four design patterns.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add grndlvl/software-patterns/gof-patterns. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use gof-patterns immediately in the current project.

Related Skills

Looking for an alternative to gof-patterns or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI