clean-architecture

Enforce Clean Architecture dependency rules and boundary patterns in code.

1|1|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/hgflima/loopy --skill clean-architecture-hgflima
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/hgflima/loopy/tree/main/.claude/skills/clean-architecture
Command: npx skills add https://github.com/hgflima/loopy --skill clean-architecture-hgflima

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers apply Clean Architecture principles to create software that is easy to maintain, test, and scale.

Core Features & Use Cases

  • Dependency Rule Enforcement: Ensures that source code dependencies always point inward, separating business logic from infrastructure details.
  • Component Principles: Applies principles like REP, CCP, CRP, ADP, SDP, and SAP to organize code into cohesive, loosely coupled components.
  • Boundary Patterns: Utilizes Controller, Presenter, and Gateway patterns to define clear boundaries between the presentation layer, business logic, and data access.
  • Use Case Implementation: Implements the Interactor pattern to encapsulate use case logic, separating it from input and output boundaries.
  • Entity Design: Encapsulates enterprise-wide business rules in entities, ensuring they remain independent of infrastructure and delivery mechanisms.
  • Service Layer: Defines clear boundaries for service layers that handle external services and infrastructure interactions.
  • Testing and Validation: Provides guidelines for testing at each level of the architecture, ensuring the integrity of business logic.

Quick Start

Use the clean-architecture skill to analyze the architecture of your project and identify areas for improvement.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
How do I enforce dependency rules in a layered architecture?

To enforce dependency rules in a layered architecture, source code dependencies must always point inward toward business logic. This separation isolates entities and use cases from infrastructure details, ensuring maintainability and testability.

What is the best way to separate business logic from infrastructure details?

Separating business logic from infrastructure details requires applying boundary patterns like Controller, Presenter, and Gateway. These patterns define clear boundaries between the presentation layer, data access, and encapsulated enterprise-wide business rules.

How do I organize code into cohesive and loosely coupled components?

Organizing code into cohesive, loosely coupled components requires applying component principles such as REP, CCP, CRP, ADP, SDP, and SAP. These principles manage dependencies and structure code for maintainability.

Do I need to understand design patterns to apply clean architecture?

Yes, applying clean architecture requires a solid understanding of design patterns and software architecture concepts. This knowledge is necessary to implement the Interactor pattern for use cases and properly structure service layers.

How does the Interactor pattern encapsulate use case logic?

The Interactor pattern encapsulates use case logic by separating it from input and output boundaries. This ensures that use case implementation remains independent of external delivery mechanisms and infrastructure interactions.

How do I test business logic integrity at each architecture level?

Testing business logic integrity at each architecture level requires following specific guidelines for each layer. This approach ensures that enterprise-wide business rules remain independent and fully validated across the architecture.