clean-architecture-validator

Detect Clean Architecture layer dependency violations in source code.

2|Updated Mar 27, 2019
One-click install
npx skills add https://github.com/silcam/lessons-from-luke --skill clean-architecture-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture-validator
Source: https://github.com/silcam/lessons-from-luke/tree/main/.claude/skills/clean-architecture-validator
Command: npx skills add https://github.com/silcam/lessons-from-luke --skill clean-architecture-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill finds Clean Architecture problems in code by checking whether each layer depends only on the layers it is allowed to use. It helps teams catch broken boundaries, misplaced interfaces, and direct links to infrastructure before they become hard to fix.

Core Features & Use Cases

  • Dependency Rule Checks: Detects when domain or application code depends on outer layers.
  • Layer Boundary Review: Maps code into domain, application, infrastructure, and presentation areas.
  • Interface Placement Review: Flags repository and port interfaces that live in the wrong layer.
  • Refactoring Guidance: Gives short fixes that explain where code should move.
  • Use Case: Review a service before release to find architecture violations and get a focused list of problems to repair.

Quick Start

Ask the clean-architecture-validator skill to review the repository for layer violations and return only the issues that need refactoring.

Frequently Asked Questions about clean-architecture-validator

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

FAQPage Schema
How do I detect clean architecture violations in my source code?

Clean architecture violations are detected by mapping source code into domain, application, infrastructure, and presentation layers, then analyzing imports to enforce dependency rules. This process flags broken boundaries, direct infrastructure links, and misplaced repository or port interfaces.

What is the dependency rule in clean architecture and how does it affect interface placement?

The dependency rule dictates that domain and application layers must never depend on infrastructure or presentation layers. Proper interface placement requires repository and port interfaces to reside in inner layers, ensuring dependencies always flow inward toward the domain.

How do I review code for layer boundary violations before a release?

Review code for layer boundary violations by running an architecture compliance audit that maps dependencies across domain, application, infrastructure, and presentation layers. This returns a focused list of issues and refactoring guidance indicating where misplaced code should move.

Can I use architecture compliance checks for refactoring guidance on misplaced ports?

Yes, architecture compliance checks validate interface placement and flag misplaced repository and port interfaces. The validation identifies ports living in the wrong layer and provides short refactoring fixes explaining exactly where the code should move.

Does clean architecture validation work without external dependencies?

Clean architecture validation works without external dependencies. It relies solely on source code import analysis and layer mapping to audit dependency flow across domain, application, infrastructure, and presentation areas without requiring additional tools.