verify-clean-arch

Validate C# projects for Clean Architecture dependency and layer violations.

2|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/daeha76/RianFriends --skill verify-clean-arch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: verify-clean-arch
Source: https://github.com/daeha76/RianFriends/tree/main/.claude/skills/verify-clean-arch
Command: npx skills add https://github.com/daeha76/RianFriends --skill verify-clean-arch

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automatically verifies adherence to Clean Architecture principles within a C# project, preventing architectural drift and ensuring maintainability.

Core Features & Use Cases

  • Layered Dependency Validation: Ensures strict unidirectional dependencies (Domain → Application → Infrastructure).
  • Domain Purity Enforcement: Prevents external library references within the Domain layer.
  • Interface Placement: Verifies interfaces reside in Domain/Application and implementations in Infrastructure.
  • Namespace Consistency: Checks if file paths align with namespace declarations.
  • Use Case: After making code changes, run this skill to catch any accidental introduction of infrastructure concerns into the domain layer, maintaining a clean and testable codebase.

Quick Start

Run the verify-clean-arch skill to check for architectural violations in the current project.

Frequently Asked Questions about verify-clean-arch

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

FAQPage Schema
How do I validate Clean Architecture rules in a C# project?

Clean Architecture validation in C# checks layer dependency direction, domain purity, interface placement, namespace consistency, and direct database references by analyzing .cs files and .csproj references to detect violations of unidirectional data flow and separation of concerns.

How do I prevent infrastructure dependencies from leaking into the domain layer?

Preventing infrastructure dependencies from leaking into the domain layer requires enforcing domain purity by scanning .cs files for external library references, ensuring the Domain layer remains isolated and maintains strict separation of concerns.

How do I check if C# namespace declarations match file paths?

Checking if C# namespace declarations match file paths involves performing a namespace consistency analysis across .cs files to verify that file paths align with namespace declarations, maintaining architectural integrity.

Does Clean Architecture validation work without external dependencies or tools?

Clean Architecture validation works without external dependencies by directly analyzing .cs files and .csproj project references to identify deviations from established architectural patterns through static analysis of your existing project structure.

What is the best way to verify interface placement in Clean Architecture?

The best way to verify interface placement in Clean Architecture is scanning your C# solution to ensure interfaces reside in Domain or Application layers while implementations reside in Infrastructure, enforcing proper separation of concerns.