dotnet-netarchtest

Automate architecture rule enforcement in .NET unit tests with NetArchTest.Rules.

8|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills --skill dotnet-netarchtest-postpartum-genushyacinthus29
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-netarchtest
Source: https://github.com/Postpartum-genushyacinthus29/dotnet-skills/tree/main/skills/dotnet-netarchtest
Command: npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills --skill dotnet-netarchtest-postpartum-genushyacinthus29

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps teams enforce architecture boundaries in .NET unit tests by applying lightweight, fluent rules via NetArchTest.Rules to validate namespaces, dependencies, and layering.

Core Features & Use Cases

  • Encapsulates usage of NetArchTest.Rules to define boundary rules that detect architectural drift in test projects.
  • Supports validating module boundaries, namespace layering, and dependency constraints with clear, actionable feedback.
  • Use Case: ensure Domain code does not depend on Infrastructure or Application layers, and wire rules into your CI pipeline to fail builds on violations.

Quick Start

Follow the Ralph Loop workflow to install NetArchTest.Rules in your test project and begin encoding boundary rules.

Frequently Asked Questions about dotnet-netarchtest

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

FAQPage Schema
How do I enforce architecture boundaries in .NET unit tests?

You can enforce architecture boundaries in .NET unit tests by adding NetArchTest.Rules to your test project and writing fluent assertions to validate namespaces, dependencies, and layering constraints.

Can I prevent my Domain layer from referencing Infrastructure in .NET?

Yes, you can prevent your Domain layer from referencing Infrastructure by defining boundary rules with NetArchTest.Rules. This skill helps you create tests that ensure Domain code does not depend on Infrastructure or Application layers.

How do I integrate architecture rule checks into a CI pipeline?

Integrate architecture rule checks into your CI pipeline by wiring NetArchTest.Rules boundary tests into your build process. This skill covers integrating test results into CI and QA workflows to automatically fail builds on architectural violations.

What is a lightweight way to test namespace layering in .NET?

A lightweight way to test namespace layering in .NET is using NetArchTest.Rules. This skill helps you define fluent rules that validate module boundaries and namespace layering constraints directly within your unit tests.

Does NetArchTest work with existing .NET unit test projects?

Yes, NetArchTest works with existing .NET unit test projects by adding the NetArchTest.Rules package. This skill applies to repositories wanting lightweight architecture assertions without requiring complex structural changes.