agentsclimarketplace

010110 clean architecture

Skill natuleadan/skills/skills/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.

Install
npx -y skills add natuleadan/skills --skill 010110-clean-architecture

Assembled 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)

  1. UI/Components — Presentation components
  2. Hooks — React hooks (if applicable)
  3. App/Pages — Route pages and layouts
  4. Actions — Entry points (Server Actions, controllers)
  5. Infrastructure — External integrations (DB, cache, APIs)
  6. Application — Use cases and services
  7. 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:

  1. Identify module boundaries
  2. Create domain entities first (pure types + logic)
  3. Extract infrastructure concerns
  4. Define application service interfaces
  5. Wire up actions as entry points
  6. Remove legacy code when migration is complete

Quick Reference

LayerCan import fromCannot import from
DomainNothingEverything
ApplicationDomainInfrastructure, UI
InfrastructureDomainUI, Actions
ActionsApp, Infra, DomainUI
UIActionsDomain (directly), Infrastructure

References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.