dotnet-archunitnet

Enforce architectural rules in .NET projects using ArchUnitNET.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps enforce architectural integrity and consistency in .NET projects by providing a robust framework for defining and verifying architecture rules, preventing common anti-patterns and outdated practices.

Core Features & Use Cases

  • Architecture Rule Definition: Define rules for layers, namespaces, naming conventions, and dependencies.
  • Automated Verification: Integrate architecture checks into the test suite and CI/CD pipelines.
  • Use Case: Ensure that your domain layer never directly depends on your infrastructure or presentation layers, maintaining a clean and maintainable architecture.

Quick Start

Use the dotnet-archunitnet skill to set up ArchUnitNET with xUnit in the current project.

Frequently Asked Questions about dotnet-archunitnet

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

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

You can enforce architecture rules in a .NET project by defining and verifying boundaries, dependency rules, and naming conventions using the ArchUnitNET library within your test projects.

Can I use ArchUnitNET with xUnit, MSTest, or TUnit for dependency analysis?

Yes, ArchUnitNET supports integration with xUnit, MSTest, or TUnit, allowing you to perform dependency analysis and verify architectural boundaries directly within your .NET test projects.

How do I prevent my domain layer from depending on infrastructure in .NET?

To prevent your domain layer from depending on infrastructure in .NET, you can define automated architecture rules using ArchUnitNET that restrict dependencies between layers and integrate these checks into your test suite.

What is the best way to check .NET naming conventions and layer boundaries?

The best way to check .NET naming conventions and layer boundaries is to use a framework like ArchUnitNET to define architectural rules and run automated verification checks during your testing and CI/CD pipelines.

Do I need a .NET test project to run architecture verification checks?

Yes, you need a .NET test project to run architecture verification checks, as ArchUnitNET requires an environment integrated with testing frameworks like xUnit, MSTest, or TUnit to execute the defined rules.

Why does my .NET architecture refactoring keep introducing dependency violations?

Architecture refactoring introduces dependency violations when rules are not automated. By implementing ArchUnitNET to define and verify dependency rules in your test suite, you can prevent common anti-patterns and outdated practices.