design-patterns

Evaluate and implement structural design patterns for recurring software architecture challenges.

25|3|Updated Jul 14, 2026
One-click install
npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill design-patterns-nimadorostkar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-patterns
Source: https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/development/design-patterns
Command: npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill design-patterns-nimadorostkar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents the misuse of architectural patterns by ensuring they are applied only when a specific, recurring problem justifies the added complexity of indirection.

Core Features & Use Cases

  • Pattern Selection: Provides a framework for choosing between creational, structural, and behavioral patterns based on the axis of change.
  • Misuse Detection: Helps identify when patterns like singletons or abstract factories are being used unnecessarily, leading to over-engineered code.
  • Use Case: When refactoring a complex conditional block, use this skill to determine if a state machine or strategy pattern is the most efficient way to simplify the logic.

Quick Start

Apply the design-patterns skill to review the current class hierarchy and suggest a more maintainable structure for the payment processing module.

Frequently Asked Questions about design-patterns

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

FAQPage Schema
How do I choose between structural and behavioral design patterns for refactoring complex code?

Choose design patterns by evaluating the specific axis of change in your code. This framework selects creational, structural, or behavioral patterns based on whether your refactoring targets extensible architecture, modularity, or complex conditional logic reduction.

When do I need a state machine or strategy pattern to simplify conditional logic?

You need a state machine or strategy pattern when refactoring complex conditional blocks that recur and require modularity. This approach validates pattern application against the axis of variation to ensure it simplifies logic without adding unnecessary abstraction.

What is the best way to detect unnecessary abstraction and over-engineering in software architecture?

Detect unnecessary abstraction by validating pattern application against the principle of least complexity. This approach identifies when singletons, abstract factories, or other patterns introduce over-engineered indirection without a specific recurring problem justifying the added complexity.

Does applying design patterns always improve code quality and extensibility?

Applying design patterns does not always improve code quality if the added indirection lacks a specific recurring problem. This approach ensures patterns are applied only when they justify their complexity, preventing over-engineering while targeting improved extensibility and modularity.

How to refactor a class hierarchy for better modularity without over-engineering?

Refactor a class hierarchy by evaluating structural design patterns against your specific axis of variation. This approach suggests a more maintainable structure that improves modularity and extensibility while adhering to the principle of least complexity to avoid unnecessary abstraction.