architecture-patterns

Structure backend applications using Clean Architecture, Hexagonal, or DDD patterns.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/gabi-agent/openretro --skill architecture-patterns-gabi-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/gabi-agent/openretro/tree/main/skills/architecture-patterns
Command: npx skills add https://github.com/gabi-agent/openretro --skill architecture-patterns-gabi-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Backend architecture patterns provide a structured approach to building maintainable, testable systems: Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.

Core Features & Use Cases

  • Clear separation of concerns: entities, use cases, ports/adapters, aggregates, repositories, and domain events
  • Pattern guidance for designing scalable, testable backends
  • Practical examples and references to standard architecture patterns to align teams

Quick Start

Identify your system boundaries and select a pattern (Clean Architecture, Hexagonal, or DDD) that best fits your domain, then implement per the guide.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
What is the best way to structure a backend using domain-driven design?

Apply hexagonal architecture by isolating your core business logic inside ports and adapters. This design allows external interfaces like databases or APIs to connect through defined ports, making your backend highly testable and swappable without altering central use cases.

How do I separate concerns when refactoring a legacy monolith backend?

Separate concerns in a legacy monolith by extracting domain logic into independent entities and use cases, wrapping external dependencies behind repository and adapter interfaces, and routing all dependencies through a central composition root to standardize team architecture.

When do I need domain events in clean architecture?

You need domain events in clean architecture when you must decouple side effects from your core use cases. They allow your backend to notify other parts of the system of state changes without hardcoding dependencies, keeping your domain layer maintainable and scalable.

How do I implement repositories and aggregates for backend design?

Implement repositories to manage aggregate persistence by defining interfaces as ports within your domain layer. Aggroups encapsulate related entities and enforce business invariants, while repositories handle data retrieval and storage through external adapters.

Does clean architecture work for standardizing team backend design?

Clean architecture works for standardizing team backend design by providing structured patterns for entities, use cases, and adapters. It enforces a central composition root and consistent dependency inversion, aligning developers on scalable and testable structural conventions.