design patterns

Provides architectural framework for sustainable software engineering using SOLID, DRY, KISS, and YAGNI principles.

Updated Feb 23, 2026
One-click install
npx skills add https://github.com/mbeps/Skills --skill design-patterns-mbeps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design patterns
Source: https://github.com/mbeps/Skills/tree/main/design-patterns
Command: npx skills add https://github.com/mbeps/Skills --skill design-patterns-mbeps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of writing maintainable, scalable, and understandable software by providing a comprehensive framework for clean code practices and architectural principles.

Core Features & Use Cases

  • Core Principle Enforcement: Systematically applies KISS, YAGNI, DRY, and SOLID principles.
  • Design Pattern Management: Guides the strategic application of design patterns to avoid overengineering.
  • Code Refactoring: Provides concrete examples and workflows for improving code structure, such as eliminating deep nesting and favouring composition over inheritance.
  • Use Case: Refactor a legacy codebase riddled with deep conditional logic and inheritance hierarchies into a more modular, readable, and maintainable structure.

Quick Start

Refactor the provided deeply nested password validation code to use guard clauses for improved readability.

Frequently Asked Questions about design patterns

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

FAQPage Schema
How do I refactor deeply nested code to improve readability?

To refactor deeply nested code, replace complex conditional logic with guard clauses. This clean code technique flattens structure, enforces KISS principles, and makes software architecture modular and maintainable.

What is the best way to balance DRY and KISS when writing clean code?

Balancing DRY and KISS involves avoiding premature abstractions to prevent overengineering. While DRY reduces duplication, strategic duplication sometimes preserves KISS, ensuring sustainable software architecture without unnecessary complexity.

How do I use composition over inheritance to optimize modularity?

Using composition over inheritance optimizes modularity by building objects from smaller, distinct components rather than rigid class hierarchies. This refactoring approach enhances flexibility and aligns with SOLID design principles.

When should I apply design patterns to avoid overengineering?

Apply design patterns strategically only when a clear structural problem emerges, adhering to YAGNI. Forcing patterns into simple logic violates KISS and creates unnecessary complexity within your software architecture.

How does SOLID improve code refactoring and maintainability?

SOLID improves refactoring by establishing five architectural principles for sustainable software. Enforcing single responsibility and dependency inversion reduces deep nesting, yielding clean code that scales efficiently.

What is the trade-off between performance optimization and code readability?

The trade-off between performance optimization and readability requires evaluating architectural constraints. Premature optimization often violates YAGNI and KISS, so prioritize clean code first and optimize only proven bottlenecks.