
ddd-clean-architecture
Provides comprehensive guidance for clean architecture including layer separation, dependency rules, and architectural patterns. Use when the user asks about clean architecture, needs to implement clean architecture principles, or structure applications with clean architecture.
- Installs
- 143
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/partme-ai/full-stack-skills --skill ddd-clean-architecture- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads ddd-clean-architecture automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
When to use this skill
Use this skill whenever the user wants to:
- Structure an application following Clean Architecture layers (Entities, Use Cases, Interface Adapters, Frameworks)
- Enforce the dependency rule: inner layers never depend on outer layers
- Organize project packages and define clear test boundaries
- Combine Clean Architecture with Domain-Driven Design patterns
How to use this skill
Workflow
- Define Entities (innermost layer) containing enterprise-wide business rules
- Define Use Cases (application layer) containing application-specific business logic
- Create Interface Adapters (presenters, gateways) that convert data between layers
- Implement Frameworks (outermost layer) for web, database, and UI concerns
Layer Structure
com.example.app/
├── entity/ # Entities — business rules, no dependencies
├── usecase/ # Use Cases — application logic, depends only on entity
│ ├── port/ # Input/output port interfaces
│ └── interactor/ # Use case implementations
├── adapter/ # Interface Adapters — presenters, gateways
│ ├── controller/ # Web controllers
│ ├── presenter/ # Response formatting
│ └── gateway/ # Gateway implementations
└── framework/ # Frameworks — DB, web server, external APIs
├── web/
└── persistence/
Use Case Example
// Use case port (input boundary)
public interface CreateOrderUseCase {
OrderOutput execute(CreateOrderInput input);
}
// Use case interactor
public class CreateOrderInteractor implements CreateOrderUseCase {
private final OrderGateway orderGateway;
private final PaymentGateway paymentGateway;
public CreateOrderInteractor(OrderGateway orderGateway, PaymentGateway paymentGateway) {
this.orderGateway = orderGateway;
this.paymentGateway = paymentGateway;
}
@Override
public OrderOutput execute(CreateOrderInput input) {
Order order = Order.create(input.getItems());
paymentGateway.charge(order.totalAmount());
orderGateway.save(order);
return OrderOutput.from(order);
}
}
Gateway Interface (defined in Use Case layer)
public interface OrderGateway {
void save(Order order);
Optional<Order> findById(String id);
}
Best Practices
- Concentrate business rules in Entities and Use Cases; avoid placing business logic in controllers or database layers
- Use interfaces to isolate I/O; this makes the core easy to replace and test
- Entities and Use Cases map naturally to DDD aggregates and domain services
- Test core layers with unit tests; test outer layers with integration or E2E tests
Resources
- Clean Architecture by Robert C. Martin
- https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
Keywords
clean architecture, dependency rule, use case, entity, interface adapter, gateway, layer separation, DDD, testability
FAQ
What does the ddd-clean-architecture skill do?
Provides comprehensive guidance for clean architecture including layer separation, dependency rules, and architectural patterns. Use when the user asks about clean architecture, needs to implement clean architecture principles, or structure applications with clean architecture.
How do I install ddd-clean-architecture?
Run npx skills add https://github.com/partme-ai/full-stack-skills --skill ddd-clean-architecture in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ddd-clean-architecture/ (personal) or .claude/skills/ddd-clean-architecture/ (project).
Which AI agents can use ddd-clean-architecture?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is ddd-clean-architecture safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains ddd-clean-architecture?
It is published by partme-ai in partme-ai/full-stack-skills. It has 143 recorded installs.
More from partme-ai/full-stack-skills
electron
partme-ai/full-stack-skills
Build cross-platform desktop applications with Electron, covering main/renderer process architecture, IPC communication, BrowserWindow management, menus, tray icons, packaging, and security best practices. Use when the user asks about Electron, needs to create desktop applications, implement Electron features, or build cross-platform desktop apps.
element-plus-vue3
partme-ai/full-stack-skills
Provides comprehensive guidance for Element Plus Vue 3 component library including installation, components, themes, internationalization, and API reference. Use when the user asks about Element Plus for Vue 3, needs to build Vue 3 applications with Element Plus, or customize component styles.
uniapp-project
partme-ai/full-stack-skills
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
drawio-flowchart
partme-ai/full-stack-skills
Creates flowcharts, swim lane diagrams, and business process diagrams using Draw.io (diagrams.net). Covers standard flowchart shapes (process, decision, start/end), connectors, auto-layout, and export to PNG/SVG/PDF. Use when the user needs to visualize workflows, decision trees, or business processes.
vue3
partme-ai/full-stack-skills
Guidance for Vue 3 using the official guide and API reference. Use when the user needs Vue 3 concepts, patterns, or API details to build components, apps, and tooling.
course-designer
partme-ai/full-stack-skills
Design structured courses including syllabi, learning objectives using Bloom's taxonomy, lesson plans, and assessment rubrics. Use when the user asks about course design, needs to create a curriculum, write learning objectives, structure educational modules, or build assessment plans.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.