mcaf-dotnet-archunitnet

Enforce architectural rules in .NET projects using ArchUnitNET.

4|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/managedcode/MCPGateway --skill mcaf-dotnet-archunitnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcaf-dotnet-archunitnet
Source: https://github.com/managedcode/MCPGateway/tree/main/.codex/skills/mcaf-dotnet-archunitnet
Command: npx skills add https://github.com/managedcode/MCPGateway --skill mcaf-dotnet-archunitnet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the need for robust, code-driven architecture validation in .NET projects, going beyond lightweight checks to enforce complex architectural rules and boundaries.

Core Features & Use Cases

  • Architecture Rule Enforcement: Define and verify complex architectural constraints using the ArchUnitNET library.
  • Integration with Test Frameworks: Seamlessly integrates with popular .NET testing frameworks like xUnit, MSTest, and TUnit.
  • Use Case: Ensure that your core domain layer never directly depends on the UI layer, or that all services adhere to a specific naming convention for dependency injection.

Quick Start

Use the mcaf-dotnet-archunitnet skill to set up ArchUnitNET with xUnit in your .NET test project.

Frequently Asked Questions about mcaf-dotnet-archunitnet

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

FAQPage Schema
How do I enforce architectural rules in a .NET project?

Enforce architectural rules in .NET by using the ArchUnitNET library to define and verify complex architectural constraints within your test projects. This ensures layers remain decoupled and dependencies adhere to specified boundaries.

Can I use ArchUnitNET with xUnit, MSTest, or TUnit test frameworks?

ArchUnitNET integrates seamlessly with xUnit, MSTest, and TUnit test frameworks. This allows you to run architecture validation checks directly alongside your existing unit tests to automatically detect architectural violations.

How do I prevent my .NET domain layer from depending on the UI layer?

Prevent your .NET domain layer from depending on the UI layer by defining code-driven architecture validation rules using ArchUnitNET. These rules are verified during testing to ensure prohibited dependencies are flagged immediately.

What do I need to set up ArchUnitNET for architecture validation in .NET?

Setting up ArchUnitNET requires a .NET test project with specified assemblies and defined architecture boundaries. You configure the test framework integration to load your assemblies and verify the architectural constraints.

What's the best way to verify naming conventions for dependency injection in .NET?

The best way to verify naming conventions for dependency injection in .NET is by enforcing architectural rules through ArchUnitNET. It validates that all services adhere to specified naming patterns during your automated test runs.