010110 clean architecture
Multi-domain agent skills collection for AI coding agents (Claude, Cursor, Copilot, OpenCode, and more). Covers programming, biology, cooking, and future domains. Installable via npx skills add.
npx -y skills add natuleadan/skills --skill 010110-clean-architectureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Clean Architecture layer ordering and strict inward dependency flow for web applications. Domain → Application → Infrastructure → Actions → UI.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.9 KB, as published. Nobody here has run it
Clean Architecture
Core Principle
Dependencies flow inward. Inner layers know nothing about outer layers.
Layer Order (Outer to Inner)
- UI/Components — Presentation components
- Hooks — React hooks (if applicable)
- App/Pages — Route pages and layouts
- Actions — Entry points (Server Actions, controllers)
- Infrastructure — External integrations (DB, cache, APIs)
- Application — Use cases and services
- Domain — Business entities (pure, no dependencies)
Layer Responsibilities
Domain Layer (Innermost)
- Pure business logic
- No external dependencies
- Entities, value objects, interfaces
- Zero imports from any other layer
Application Layer
- Use cases and service orchestration
- Depends only on domain interfaces (ports)
- DTOs for data transfer
- No framework or infrastructure imports
Infrastructure Layer
- Implements application interfaces (adapters)
- Database clients, external API clients, cache, file storage
- Vendor SDKs live here
- Cookie I/O, authentication providers
Actions Layer
- Entry points: Server Actions, API route handlers, CLI commands
- Validate authentication and authorization
- Call application services
- Thin — no business logic
UI Layer (Outermost)
- Components, pages, layouts
- Calls actions (not services/repositories directly)
- Read-only data fetching via dedicated hooks
Clean Architecture Checklist
- Domain has no imports from infrastructure or UI
- Application uses interfaces (ports), not concrete implementations
- Infrastructure implements application interfaces (adapters)
- Actions call services, not repositories directly
- All external dependencies are in infrastructure layer
- UI calls actions, not services or repositories
- Dependency direction: UI → Actions → App → Infra → Domain
- No circular dependencies between layers
Migration Pattern
For legacy modules without clear layering:
- Identify module boundaries
- Create domain entities first (pure types + logic)
- Extract infrastructure concerns
- Define application service interfaces
- Wire up actions as entry points
- Remove legacy code when migration is complete
Quick Reference
| Layer | Can import from | Cannot import from |
|---|---|---|
| Domain | Nothing | Everything |
| Application | Domain | Infrastructure, UI |
| Infrastructure | Domain | UI, Actions |
| Actions | App, Infra, Domain | UI |
| UI | Actions | Domain (directly), Infrastructure |
References
- Layers
- Service Layering — Repository → Service → Action layer pattern with userRole propagation