architecture-patterns

Apply Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to organize backend code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/rawhit-r/ai-files --skill architecture-patterns-rawhit-r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/rawhit-r/ai-files/tree/main/.gemini/architecture-patterns
Command: npx skills add https://github.com/rawhit-r/ai-files --skill architecture-patterns-rawhit-r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Backend complexity and evolving requirements are hard to manage; applying proven architecture patterns helps structure code to improve maintainability, testability, and scalability.

Core Features & Use Cases

  • Clean Architecture, Hexagonal Architecture, and Domain-Driven Design guide the separation of concerns, testability, and adaptability.
  • Use cases include designing new systems, refactoring monoliths, and establishing team-wide architecture standards for consistent quality.
  • The combination of layered structure, ports/adapters, and ubiquitous language enables easier evolution and onboarding.

Quick Start

Start by modeling a simple domain, define its core entities and use cases, then organize code into inner business rules, interface adapters, and external details.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
How do I structure backend code to handle evolving business requirements?

Structure backend code by applying Clean Architecture and Domain-Driven Design principles to separate business rules from interfaces. This enforces the dependency rule, ensuring core logic remains isolated and maintainable as requirements evolve.

What is the best way to refactor a monolith for better testability?

Refactor a monolith using Hexagonal Architecture and ports and adapters to isolate business rules from external infrastructure. This approach decouples core logic, enabling independent unit testing and easier maintainability.

How does Domain-Driven Design help organize backend systems?

Domain-Driven Design helps organize backend systems by establishing a ubiquitous language and modeling core entities. It separates business rules into a protected inner domain, creating adaptable code that is easier to onboard and evolve.

Can I use Clean Architecture to establish team-wide backend standards?

Yes, you can use Clean Architecture to establish team-wide backend standards. It provides a consistent layered structure for interfaces, business rules, and infrastructure, ensuring uniform quality and maintainability across development teams.

When should I apply Hexagonal Architecture in backend design?

Apply Hexagonal Architecture when you need to decouple business logic from external interfaces and infrastructure. Using ports and adapters ensures your core domain remains testable and adaptable to changing technologies.

How do I start modeling a domain for a new backend system?

Start modeling a domain by defining its core entities and use cases. Organize the code into inner business rules, interface adapters, and external infrastructure details to enforce separation of concerns from the beginning.