Creational Pattern Selector for Openclaw

A specialized tool for identifying and implementing the optimal Gang of Four creational design pattern based on specific object construction challenges.

quochungto
v1.0.0
Apr 10, 2026
0
361
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install bookforge-creational-pattern-selector

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install bookforge-creational-pattern-selector using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Creational Pattern Selector?

The Creational Pattern Selector is a technical intelligence module designed to solve the common architectural problem of inflexible object creation. By analyzing codebases for hard-coded constructor calls and complex initialization logic, this skill guides developers through the selection of one of the five classic creational patterns: Abstract Factory, Builder, Factory Method, Prototype, or Singleton.

Leveraging Openclaw Skills, this tool provides a structured decision framework that balances two primary strategies: class-based parameterization through subclassing and object-based parameterization through composition. It ensures that developers don't just pick a familiar pattern, but the one that best fits their system's evolution path and runtime requirements.

Creational Pattern Selector Use Cases

  • Replacing scattered new ConcreteClass() calls with flexible creation hooks.
  • Designing systems that require the creation of families of related or dependent objects.
  • Simplifying complex, multi-step object construction processes (e.g., document converters).
  • Implementing runtime object creation via cloning to avoid subclass explosion.
  • Ensuring global access to a single instance of a resource or state manager.

How Creational Pattern Selector Works

  1. Frame the Problem: Identify if the issue lies in product type variation, construction complexity, or uniqueness constraints.
  2. Determine Parameterization Strategy: Choose between subclass-based (Factory Method) or composition-based (Abstract Factory/Builder/Prototype) approaches.
  3. Apply Checklists: Validate the scenario against specific applicability criteria for each of the five patterns.
  4. Map Evolution Path: Evaluate if the design should start simple (Factory Method) or requires immediate flexibility (Abstract Factory).
  5. Generate Recommendation: Produce a scored report including trade-offs, decoupling benefits, and alternative patterns considered.

Creational Pattern Selector Setup

To add this capability to your environment, use the following command through your Openclaw Skills manager:

clawhub install bookforge-creational-pattern-selector

Ensure that the design-pattern-selector dependency is also installed for full routing capabilities.

Creational Pattern Selector Data Schema & Taxonomy

The skill organizes its analysis using a structured taxonomy of creation problems:

Element Description
Product Type Single object, family of objects, or complex composite.
Variation Axis Whether the concrete class, construction steps, or state needs to vary.
Flexibility Timing Compile-time vs. Run-time requirements.
Strategy Categorization as Subclassing vs. Composition.

Creational Pattern Selector Advanced Features

  • Evolution Path Mapping: Predicts when to migrate from Factory Method to more complex patterns like Abstract Factory.
  • Maze Game Simulation: Uses the classic GoF Maze Game scenario to compare pattern implementations side-by-side.
  • Runner-up Analysis: Explicitly identifies why the second-best pattern was ruled out to prevent architectural second-guessing.
  • Pattern Combination: Recommends compatible pattern pairings, such as using Singleton with Abstract Factory.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*