aj-geddes/useful-ai-prompts

design-patterns-implementation

Apply appropriate design patterns (Singleton, Factory, Observer, Strategy, etc.) to solve architectural problems. Use when refactoring code architecture, implementing extensible systems, or following SOLID principles.

First seen Jan 21, 2026

Installation

$ npx skills add aj-geddes/useful-ai-prompts --skill design-patterns-implementation

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from aj-geddes/useful-ai-prompts · top by installs.

npx skills add aj-geddes/useful-ai-prompts

Browse all from aj-geddes/useful-ai-prompts

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Also listed on

Alternate registries and mirrors of this skill.

Repository health

Stars 334
License LICENSE
Default branch main
Open issues 1
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,675 B
  • docs SUMMARY.md 2,575 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 581 installs

SKILL.md

Design Patterns Implementation

Table of Contents

  • [Overview](#overview)
  • [When to Use](#when-to-use)
  • [Quick Start](#quick-start)
  • [Reference Guides](#reference-guides)
  • [Best Practices](#best-practices)

Overview

Apply proven design patterns to create maintainable, extensible, and testable code architectures.

When to Use

  • Solving common architectural problems
  • Making code more maintainable and testable
  • Implementing extensible plugin systems
  • Decoupling components
  • Following SOLID principles
  • Code reviews identifying architectural issues

Quick Start

Minimal working example:

class DatabaseConnection {
  private static instance: DatabaseConnection;
  private connection: any;

  private constructor() {
    this.connection = this.createConnection();
  }

  public static getInstance(): DatabaseConnection {
    if (!DatabaseConnection.instance) {
      DatabaseConnection.instance = new DatabaseConnection();
    }
    return DatabaseConnection.instance;
  }

  private createConnection() {
    return {
      /* connection logic */
    };
  }
}

// Usage
const db1 = DatabaseConnection.getInstance();
const db2 = DatabaseConnection.getInstance();
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
[Singleton Pattern](references/singleton-pattern.md) Singleton Pattern
[Factory Pattern](references/factory-pattern.md) Factory Pattern
[Observer Pattern](references/observer-pattern.md) Observer Pattern
[Strategy Pattern](references/strategy-pattern.md) Strategy Pattern
[Decorator Pattern](references/decorator-pattern.md) Decorator Pattern
[Repository Pattern](references/repository-pattern.md) Repository Pattern
[Dependency Injection](references/dependency-injection.md) Dependency Injection

Best Practices

✅ DO

  • Choose patterns that solve actual problems
  • Keep patterns simple and understandable
  • Document why patterns were chosen
  • Consider testability
  • Follow SOLID principles
  • Use dependency injection
  • Prefer composition over inheritance

❌ DON'T

  • Apply patterns without understanding them
  • Over-engineer simple solutions
  • Force patterns where they don't fit
  • Create unnecessary abstraction layers
  • Ignore team familiarity with patterns