architecture-patterns

Implement Clean Architecture, Hexagonal Architecture, and Domain-Driven Design patterns.

1|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/knopki/dotfiles --skill architecture-patterns-knopki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/knopki/dotfiles/tree/main/home/private_dot_config/opencode/skills/architecture-patterns
Command: npx skills add https://github.com/knopki/dotfiles --skill architecture-patterns-knopki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers design, refactor, and maintain complex backend systems by implementing proven architectural patterns like Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.

Core Features & Use Cases

  • Pattern Implementation: Provides guidance and examples for Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.
  • Maintainability & Scalability: Enables building systems that are easier to test, modify, and scale.
  • Use Case: When starting a new microservice or refactoring a monolith, use this Skill to understand and apply the principles of Clean Architecture to ensure a robust and maintainable design.

Quick Start

Understand the core concepts of Clean Architecture by reviewing the provided directory structure and implementation examples.

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
How do I structure a backend project using Clean Architecture and Domain-Driven Design?

Structure a backend project using Clean Architecture and Domain-Driven Design by organizing code into distinct layers for domain logic, application use cases, and infrastructure, ensuring dependencies point inward toward the domain core for maintainable and testable systems.

What is the best way to refactor a monolithic application into a maintainable architecture?

The best way to refactor a monolithic application is to apply proven architecture patterns like Hexagonal Architecture and Domain-Driven Design to isolate business logic from infrastructure, improving testability and scalability during the transition.

How does Hexagonal Architecture work for isolating backend business logic?

Hexagonal Architecture works by isolating backend business logic inside an application core, interacting with external systems like databases or APIs through defined ports and adapters, ensuring the core domain remains independent and highly testable.

When do I need Domain-Driven Design for complex backend systems?

You need Domain-Driven Design for complex backend systems when maintaining a clear separation between business logic and infrastructure, allowing you to scale effectively and manage domain complexity through structured architectural patterns.

Does this architecture patterns guidance include code examples and directory structures?

Yes, this architecture patterns guidance includes concrete code examples and recommended directory structures for Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to help you implement maintainable and scalable backend systems.

What are the limitations of applying Clean Architecture to a new microservice?

Limitations of applying Clean Architecture to a new microservice include potential boilerplate overhead and complexity from strict layer separation, which requires careful dependency management to maintain the intended scalability and testability benefits.