design-patterns

Explain and demonstrate software design patterns with TypeScript examples and a decision guide.

20|5|Updated Jan 5, 2026
One-click install
npx skills add https://github.com/miles990/claude-software-skills --skill design-patterns-miles990
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-patterns
Source: https://github.com/miles990/claude-software-skills/tree/main/software-design/design-patterns
Command: npx skills add https://github.com/miles990/claude-software-skills --skill design-patterns-miles990

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides reusable solutions to common software design problems, helping developers build more robust, maintainable, and scalable applications.

Core Features & Use Cases

  • Comprehensive Pattern Catalog: Covers Creational, Structural, and Behavioral patterns with clear explanations and code examples.
  • Decision Guidance: Offers a decision tree to help select the appropriate pattern for a given problem.
  • Anti-Pattern Awareness: Highlights common pitfalls to avoid in software design.
  • Use Case: When designing a new feature that requires flexible object creation, consult this Skill to understand and implement the Factory Method or Builder pattern effectively.

Quick Start

Explain the Observer pattern and provide a TypeScript example.

Frequently Asked Questions about design-patterns

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

FAQPage Schema
What are software design patterns and when do I need them for clean code?

Software design patterns are reusable solutions to common software architecture problems, categorized into creational, structural, and behavioral types. You need them to build maintainable, scalable applications and establish a shared vocabulary for object-oriented programming.

How do I choose the right software design pattern for object creation?

To choose the right software design pattern for object creation, use a decision tree to evaluate your specific needs. For flexible object creation, patterns like Factory Method or Builder are appropriate choices for structuring code and managing interactions.

What is the difference between creational, structural, and behavioral design patterns?

Creational design patterns manage object creation mechanisms, structural patterns compose interfaces and define relationships between objects, and behavioral patterns handle communication and interaction between objects. Selecting appropriate patterns across these categories ensures robust software design.

How do I implement the Observer pattern with a code example?

Implement the Observer behavioral design pattern by defining a subject that maintains a list of dependent observers, notifying them of state changes automatically. This Skill provides clear explanations and TypeScript examples demonstrating classic and modern software design patterns.

What are common software design anti-patterns I should avoid?

Common software design anti-patterns are recurring flawed solutions that lead to maintainability issues, such as tight coupling or rigid structures. This Skill highlights these common pitfalls to avoid in software design, complementing the pattern catalog with practical awareness.

Can I use design patterns to fix poorly structured object-oriented code?

Design patterns aid in refactoring poorly structured object-oriented code by providing established architectural blueprints. Applying structural and behavioral patterns helps decouple code, manage object interactions, and transition legacy systems toward cleaner software architecture.