Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Python applications with FastAPI or Flask. Use when designing maintainable backends with separation of concerns, implementing repository patterns, creating entities/value objects/aggregates, or structuring domain logic independent of frameworks for testability.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Clean Architecture, DDD & Hexagonal Architecture for Python
## Overview
This skill provides comprehensive guidance for implementing Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design patterns in Python applications. It focuses on creating maintainable, testable, and framework-independent business logic through proper separation of concerns.
### Core Concepts
**Layered Architecture (Clean Architecture)** - Dependencies flow inward, inner layers know nothing about outer layers:
```
+-------------------------------------+
| Infrastructure (Frameworks, DB) | <- Outer layer
+-------------------------------------+
| Adapters (Controllers, Repos) |
+-------------------------------------+
| Use Cases (Application Logic) |
+-------------------------------------+
| Domain (Entities, Value Objects) | <- Inner layer
+-------------------------------------+
```
**Layers:**
- **Domain**: Entities, value objects, domain events, repository interfaces
- **Use Cases**: Application business rules, orchestrate domain objects
- **Adapters**: Interface implementations (controllers, repositories, gateways)
…
The line at the top of this page pins the label git:20260223.c6d4db1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_lte77faatxxu2smd
GET https://markdownregistry.com/api/v1/resolve?ref=giuseppe-trisciuoglio/developer-kit/clean-architecture
GET https://markdownregistry.com/api/v1/blob/bdcfe77f6a351e59139a455f81671d72e61d04b56a99b9f40c8d5305ca44c225
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
giuseppe-trisciuoglio/developer-kit · plugins/developer-kit-ai/skills/prompt-engineering/SKILL.md · Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection…
giuseppe-trisciuoglio/developer-kit · plugins/developer-kit-aws/skills/aws-cloudformation/aws-cloudformation-auto-scaling/SKILL.md · Provides AWS CloudFormation patterns for Auto Scaling including EC2, ECS, and Lambda. Use when creating Auto Scaling…
giuseppe-trisciuoglio/developer-kit · plugins/developer-kit-aws/skills/aws-cloudformation/aws-cloudformation-dynamodb/SKILL.md · Provides AWS CloudFormation patterns for DynamoDB tables, GSIs, LSIs, auto-scaling, and streams. Use when creating…
giuseppe-trisciuoglio/developer-kit · plugins/developer-kit-aws/skills/aws-cloudformation/aws-cloudformation-ec2/SKILL.md · Provides AWS CloudFormation patterns for EC2 instances, Security Groups, IAM roles, and load balancers. Use when…
ciembor/agent-rules-books · clean-architecture/SKILL.md · Apply Robert C. Martin-inspired architecture rules when separating business policy from frameworks, databases, UI, or…
wondelai/skills · plugins/systems-architecture/skills/clean-architecture/SKILL.md · Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to…
wondelai/skills · clean-architecture/SKILL.md · Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to…
wondelai/skills · plugins/wondelai-skills/skills/clean-architecture/SKILL.md · Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to…
mindrally/skills · clean-architecture/SKILL.md · Guidelines for implementing Clean Architecture patterns in Flutter and Go applications, with emphasis on separation of…