@aj-geddes/design-patterns-implementation

>

View in AI SkillSafe app
Scanned · no findings
0 downloads
0 stars
0 demos
SKILL.md
namedesign-patterns-implementation
description>

Design Patterns Implementation

Table of Contents

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 Singleton Pattern
Factory Pattern Factory Pattern
Observer Pattern Observer Pattern
Strategy Pattern Strategy Pattern
Decorator Pattern Decorator Pattern
Repository Pattern Repository Pattern
Dependency Injection 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

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/design-patterns-implementation/verified)](https://skillsafe.ai/skill/@aj-geddes/design-patterns-implementation/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/design-patterns-implementation/installs)](https://skillsafe.ai/skill/@aj-geddes/design-patterns-implementation/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/design-patterns-implementation/scan)](https://skillsafe.ai/skill/@aj-geddes/design-patterns-implementation/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/design-patterns-implementation/eval)](https://skillsafe.ai/skill/@aj-geddes/design-patterns-implementation/)