creational

Apply GoF creational design patterns to complex object creation.

1|1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Entelligentsia/skillforge --skill creational
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creational
Source: https://github.com/Entelligentsia/skillforge/tree/main/design-patterns/skills/creational
Command: npx skills add https://github.com/Entelligentsia/skillforge --skill creational

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when object creation is the source of pain — constructors growing too complex, the same setup repeated, unclear which concrete type to instantiate, or a shared instance causing hidden coupling. This Skill covers all 5 GoF creational patterns: Singleton, Builder, Factory Method, Abstract Factory, Prototype.

Core Features & Use Cases

  • Understand and apply the five creational patterns to separate construction logic from usage.
  • Identify scenarios where you need a single shared instance, controlled object creation, or families of related products.
  • Real-world example: selecting a creational pattern to tailor object creation to your domain, improving testability and maintainability.

Quick Start

Implement a small example illustrating how to apply one creational pattern (Singleton, Builder, Factory Method, Abstract Factory, or Prototype) to a given object in your language of choice.

Frequently Asked Questions about creational

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

FAQPage Schema
When should I use creational design patterns instead of calling a constructor directly?

Use creational design patterns when object creation becomes complex, repetitive, or causes hidden coupling, such as when constructors grow too large or the concrete type to instantiate is unclear. They separate construction logic from usage to improve maintainability.

How do I choose between Singleton, Builder, Factory Method, Abstract Factory, and Prototype?

Choose Singleton for a shared instance, Builder for complex step-by-step construction, Factory Method for unclear concrete types, Abstract Factory for families of related products, and Prototype for cloning existing objects. The Skill provides guidance on selecting the right pattern for your scenario.

How do I implement the Factory Method pattern in my programming language?

You can implement the Factory Method pattern using the language-agnostic guidance and example templates provided. These templates demonstrate how to define an interface for creating objects while letting subclasses decide which concrete type to instantiate.

Does this Skill provide language-specific code examples for the Abstract Factory pattern?

The Skill provides language-agnostic guidance and example templates for the Abstract Factory pattern. This allows you to adapt the implementation of creating families of related objects to your specific programming language of choice.

What is the best way to handle complex object construction with too many constructor parameters?

The best way to handle complex object construction with excessive parameters is the Builder pattern. It separates the construction of a complex object from its representation, allowing step-by-step setup that improves readability and prevents telescoping constructors.

Why does using a shared Singleton instance cause hidden coupling in my codebase?

A shared Singleton instance causes hidden coupling because it acts as a global state, making dependencies implicit and difficult to mock during testing. Introducing creational patterns can help isolate this construction logic and improve testability.