dotnet-netarchtest
Skill13 starsChanged 8 months agoMITView on GitHub
Use the open-source free `NetArchTest.Rules` library for architecture rules in .NET unit tests. Use when a repo wants lightweight, fluent architecture assertions for namespaces, dependencies, or layering.
In this repository84 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- dotnet-analyzer-configSkill
- dotnet-architectureSkill
- dotnet-archunitnetSkill
- dotnet-aspireSkill
- dotnet-aspnet-coreSkill
- dotnet-asynkron-profilerSkill
- dotnet-azure-functionsSkill
- dotnet-biomeSkill
- dotnet-blazorSkill
- dotnet-chousSkill
- dotnet-clocSkill
- dotnet-code-analysisSkill
- dotnet-codeqlSkill
- dotnet-code-reviewSkill
- dotnet-complexitySkill
- dotnet-coverletSkill
- dotnet-csharpierSkill
- dotnet-entity-framework6Skill
- dotnet-entity-framework-coreSkill
- dotnet-eslintSkill
- dotnet-formatSkill
- dotnet-grpcSkill
- dotnet-htmlhintSkill
- dotnet-legacy-aspnetSkill
- dotnet-libvlcSkill
- dotnet-managedcode-communicationSkill
- dotnet-managedcode-markitdownSkill
- dotnet-managedcode-mimetypesSkill
- dotnet-managedcode-orleans-graphSkill
- dotnet-managedcode-orleans-signalrSkill
- dotnet-managedcode-storageSkill
- dotnet-mauiSkill
- dotnet-mcaf-agile-deliverySkill
- dotnet-mcaf-devexSkill
- dotnet-mcaf-documentationSkill
- dotnet-mcaf-feature-specSkill
- dotnet-mcaf-human-review-planningSkill
- dotnet-mcaf-ml-ai-deliverySkill
- dotnet-mcaf-nfrSkill
- dotnet-mcafSkill
- dotnet-mcaf-source-controlSkill
- dotnet-mcaf-ui-uxSkill
- dotnet-mcpSkill
- dotnet-metalintSkill
- dotnet-meziantou-analyzerSkill
- dotnet-microsoft-agent-frameworkSkill
- dotnet-microsoft-extensions-aiSkill
- dotnet-microsoft-extensionsSkill
- dotnet-minimal-apisSkill
- dotnet-mixed-realitySkill
- dotnet-mlnetSkill
- dotnet-modern-csharpSkill
- dotnet-mstestSkill
- dotnet-mvvmSkill
- dotnet-nunitSkill
- dotnet-orleansSkill
- dotnet-profilingSkill
- dotnet-project-setupSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
leave reusable project context so future tasks are faster and safer
- Distinctive: line 34
Read the nearest AGENTS.md and confirm scope and constraints.
- Very specific: line 35
Run this skill's Workflow through the Ralph Loop until outcomes are acceptable.
- Distinctive: line 44
Keep rules readable and close to the boundary they protect.
- Very specific: line 49
If NetArchTest.Rules is not configured yet:
- Distinctive: line 53
Add the package to the architecture test project:
- Distinctive: line 55
Add at least one executable boundary rule test.
- Very specific: line 57
Run dotnet test TEST_PROJECT.csproj and return status: configured or status: improved.
- Very specific: line 58
If richer modeling is required and ArchUnitNET is chosen as the standard, return status: not_applicable.
- Distinctive: line 73
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
- Distinctive: line 78
write a detailed execution plan
- Distinctive: line 83
Update the plan after each iteration.
- Very specific: line 85
If a dependency is missing, bootstrap it or return status: not_applicable with explicit reason and fallback path.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NetArchTest
Trigger On
- the repo uses or wants
NetArchTest.Rules - architecture rules should be enforced in automated tests
Value
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
Do Not Use For
- very rich architecture modeling that needs a heavier DSL
Inputs
- the nearest
AGENTS.md - architecture boundaries to enforce
- target assemblies
Quick Start
- Read the nearest
AGENTS.mdand confirm scope and constraints. - Run this skill's
Workflowthrough theRalph Loopuntil outcomes are acceptable. - Return the
Required Result Formatwith concrete artifacts and verification evidence.
Workflow
- Encode only durable architecture rules:
- forbidden dependencies
- namespace layering
- type shape conventions
- Keep rules readable and close to the boundary they protect.
- Fail tests on architecture drift, not on temporary style noise.
Bootstrap When Missing
If NetArchTest.Rules is not configured yet:
- Detect existing setup:
rg -n "NetArchTest\\.Rules" -g '*.csproj' .
- Add the package to the architecture test project:
dotnet add TEST_PROJECT.csproj package NetArchTest.Rules
- Add at least one executable boundary rule test.
- Wire architecture tests into the standard
testcommand inAGENTS.mdand CI. - Run
dotnet test TEST_PROJECT.csprojand returnstatus: configuredorstatus: improved. - If richer modeling is required and
ArchUnitNETis chosen as the standard, returnstatus: not_applicable.
Deliver
- architecture tests that are understandable and stable
- boundary checks wired into the normal test path used by agents and CI
Validate
- the rules map to real boundaries the team cares about
- failures point to actionable dependency drift
Ralph Loop
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
- Plan first (mandatory):
- analyze current state
- define target outcome, constraints, and risks
- write a detailed execution plan
- list final validation skills to run at the end, with order and reason
- Execute one planned step and produce a concrete delta.
- Review the result and capture findings with actionable next fixes.
- Apply fixes in small batches and rerun the relevant checks or review steps.
- Update the plan after each iteration.
- Repeat until outcomes are acceptable or only explicit exceptions remain.
- If a dependency is missing, bootstrap it or return
status: not_applicablewith explicit reason and fallback path.
Required Result Format
status:complete|clean|improved|configured|not_applicable|blockedplan: concise plan and current iteration stepactions_taken: concrete changes madevalidation_skills: final skills run, or skipped with reasonsverification: commands, checks, or review evidence summaryremaining: top unresolved items ornone
For setup-only requests with no execution, return status: configured and exact next commands.
Load References
references/patterns.mdreferences/examples.mdreferences/netarchtest.md
Example Requests
- "Add architecture tests with NetArchTest."
- "Block UI from referencing data directly."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

