designing-clean-architecture

Map code boundaries to Domain, Application, Adapters, and Infrastructure layers.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/ReadyStateChange/agents --skill designing-clean-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: designing-clean-architecture
Source: https://github.com/ReadyStateChange/agents/tree/main/skills/designing-clean-architecture
Command: npx skills add https://github.com/ReadyStateChange/agents --skill designing-clean-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Designs and reviews systems using clean architecture placement rules. It helps decide where logic belongs across domain, application, adapters, and infrastructure, and prevents layering violations and framework leakage.

Core Features & Use Cases

  • Define and map logical ownership to the innermost, most stable layer (Domain) and push framework/infra details outward.
  • Review code and PRs for dependency direction violations and policy leakage, guiding refactors.
  • Produce actionable placement decisions and architecture drafts for new systems or refactors.

Quick Start

Provide a use case, architecture draft, or file paths to evaluate, and I will propose the inner-layer placements accordingly.

Frequently Asked Questions about designing-clean-architecture

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

FAQPage Schema
How do I review code for clean architecture boundary violations and dependency direction issues?

To review code for clean architecture violations, map logical ownership to Domain, Application, Adapters, and Infrastructure layers to enforce inward dependencies and prevent framework leakage. Provide file paths or a PR for analysis to receive actionable placement guidance and refactor recommendations.

What is the best way to map domain-driven design layers when planning a new system architecture?

Mapping domain-driven design layers involves assigning logic to the innermost Domain layer and pushing framework or infrastructure details outward to Adapters and Infrastructure. This approach produces actionable placement decisions and architecture drafts that ensure clear boundary decisions and stable dependency directions.

How do I decide where logic belongs when separating domain code from infrastructure and adapters?

Deciding where logic belongs requires evaluating dependencies and pushing framework details outward to infrastructure and adapter layers. Define and map logical ownership to the innermost, most stable Domain layer to prevent layering violations and ensure policy does not leak into inner layers.

Can I use clean architecture placement rules to analyze existing design docs and codebases for policy leakage?

Yes, you can use clean architecture placement rules to analyze existing design docs and codebases for policy leakage. Provide a use case or architecture draft, and the system evaluates dependency direction violations across layers, guiding refactors to enforce inward dependencies and correct boundary decisions.

Why does framework and infrastructure logic leak into the domain layer during refactoring?

Framework and infrastructure logic leaks into the domain layer when dependency direction rules are violated and boundaries are unclear. Applying dependency inversion and mapping logical ownership to outer layers prevents this leakage by keeping the innermost domain layer stable and free of external policy details.