patterns

Apply SOLID-oriented design patterns to refactor legacy code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Dsantiagomj/DSMJ-Ai-Toolkit --skill patterns-dsantiagomj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: patterns
Source: https://github.com/Dsantiagomj/DSMJ-Ai-Toolkit/tree/main/skills/domain/patterns
Command: npx skills add https://github.com/Dsantiagomj/DSMJ-Ai-Toolkit --skill patterns-dsantiagomj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Patterns provide a structured toolbox for architecting and refactoring software so code is more maintainable, extensible, and easier to reason about.

Core Features & Use Cases

  • SOLID Principles: practical guidance on single responsibility, open/closed, and dependency injection to improve testability and flexibility.
  • Catalog of Core Patterns: Factory, Builder, Adapter, Decorator, Facade, Observer, Strategy, Command, and more with clear usage criteria.
  • Anti-Patterns & Best Practices: concrete examples of common pitfalls and how to avoid them.
  • Use Cases: when to apply a pattern during system design or during refactoring for clarity and maintainability.

Quick Start

Analyze a legacy module, choose applicable design patterns, and implement a pattern-based solution with accompanied code examples.

Frequently Asked Questions about patterns

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

FAQPage Schema
How do I apply SOLID principles and design patterns to refactor legacy TypeScript code?

Design patterns to avoid include common anti-patterns that hurt maintainability. You learn concrete examples of these pitfalls and apply best practices to select the right pattern, ensuring your software architecture remains clean and extensible.

How do I choose the right design pattern for a new software module?

To choose the right design pattern for a new module, you evaluate clear usage criteria for patterns like Builder, Decorator, and Observer. This ensures your software design aligns with SOLID-oriented architecture and specific use cases.

What is the best way to implement the Factory or Strategy pattern in TypeScript?

The best way to implement Factory or Strategy patterns in TypeScript is using code-oriented guidance that specifies practical examples. This approach ensures your pattern-based solution is robust, maintainable, and aligns with software design best practices.

When should I use the Observer or Command pattern during software architecture design?

You should use the Observer or Command pattern during software architecture design when you need to handle events or encapsulate requests. The Skill provides references to guide pattern selection for clarity and maintainability in these specific use cases.