clean-architecture-guide

Design modular monolith clean-architecture structures with strict dependency boundaries.

Updated May 16, 2026
One-click install
npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill clean-architecture-guide-p-o-ke-nae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture-guide
Source: https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory/tree/main/.github/skills/clean-architecture-guide
Command: npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill clean-architecture-guide-p-o-ke-nae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes guesswork when building or extending this repository’s Modular Monolith and Clean Architecture structure, so new features follow the same dependency rules, layering, and delivery flow every time.

Core Features & Use Cases

  • Module Scaffolding: Defines the Domain, Application, and Infrastructure projects needed for a new module.
  • Architecture Guardrails: Keeps Web, Application, Domain, and Infrastructure dependencies aligned with the project rules.
  • Aspire and Testing Workflow: Explains how to wire services through AppHost, register dependencies, and cover changes with unit and integration tests.
  • Use Case: Add a new story-related feature, implement its repository and use cases, connect it to the Web app, and verify it with the required test projects.

Quick Start

Use this skill to plan and implement a new module or feature in this repository while following the clean architecture and Aspire rules.

Frequently Asked Questions about clean-architecture-guide

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

FAQPage Schema
How do I scaffold a new module in a dotnet modular monolith following clean architecture?

To scaffold a new module in a dotnet modular monolith, create separate Domain, Application, and Infrastructure projects. This structure enforces strict dependency boundaries, keeping domain logic isolated while preparing for Cosmos DB repository patterns and Aspire service wiring.

How does clean architecture enforce dependency boundaries between Web and Domain layers?

Clean architecture enforces dependency boundaries by ensuring the Web layer only accesses DTOs and depends on Application, never directly referencing Infrastructure or Domain internals. This unidirectional dependency flow prevents infrastructure concerns from leaking into business logic.

Can I use Cosmos DB repository patterns with Aspire in a clean architecture setup?

Yes, you can use Cosmos DB repository patterns with Aspire in a clean architecture setup. The Infrastructure layer implements repository interfaces defined in Application, while the AppHost project handles Aspire service registration and dependency injection wiring for the Web project.

What is the best way to wire Aspire services and DI registration across clean architecture projects?

The best way to wire Aspire services and DI registration is through the AppHost project. It orchestrates service defaults, registers Cosmos DB dependencies, and configures DI containers for Application and Infrastructure layers, ensuring Web projects receive properly scoped DTOs and use cases.

How do I plan unit and integration tests for a new clean architecture module?

To plan unit and integration tests for a clean architecture module, use MSTest to cover Domain logic and Application use cases with unit tests, while integration tests validate Infrastructure repository implementations against Cosmos DB and verify Web API endpoints.

Why does my Web project need DTO-only access in a clean architecture modular monolith?

Your Web project needs DTO-only access in a clean architecture modular monolith to prevent domain entity corruption and maintain strict layer separation. This ensures presentation concerns remain decoupled from business rules, enforcing boundaries between the Web and Application layers.