Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

design-patterns-implementation

FreeRuns bundled scriptsNot checked

Apply appropriate design patterns (Singleton, Factory, Observer, Strategy, etc.) to solve architectural problems. Use when refactoring code architecture…

aj-geddesby aj-geddes★ 398 GitHub stars17 installs in other catalogs

About this skill

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

Install design-patterns-implementation in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/decorator-pattern.mdreferences/dependency-injection.mdreferences/factory-pattern.mdreferences/observer-pattern.mdreferences/repository-pattern.mdreferences/singleton-pattern.mdreferences/strategy-pattern.mdscripts/scaffold-tests.shtemplates/test-template.js

FAQ

What does the design-patterns-implementation skill do?

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.

How do I install the design-patterns-implementation skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the design-patterns-implementation skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare design-patterns-implementation with