mcaf-dotnet-archunitnet

Guidance for using ArchUnitNET, a free .NET library that tests whether code follows defined architecture rules.

In plain words
What is it for?
Use it to test boundaries, naming conventions, and other architecture rules in .NET test projects.
Why use it?
It helps catch unwanted dependencies and boundary violations automatically instead of relying only on manual review. It is intended for architecture checks that need more detail than simple dependency rules.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/managedcode/dotpilot/mcaf-dotnet-archunitnet
Any agent
npx skills add managedcode/dotPilot --skill mcaf-dotnet-archunitnet
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotPilot

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 896 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.00896
Opus 5 $0.00022 $0.00448
Sonnet 5 $0.00009 $0.00179
Haiku 4.5 $0.00004 $0.00090

Measured 2d ago against content hash 6f0d7e2c3236, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcaf-dotnet-archunitnet scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to archunitnet — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.codex/skills/mcaf-dotnet-archunitnet/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCAF: .NET ArchUnitNET

Trigger On

  • the repo uses or wants ArchUnitNET
  • architecture testing needs richer modeling than simple dependency checks

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

  • the lightest possible architecture rule checks

Inputs

  • the nearest AGENTS.md
  • target assemblies
  • architecture boundaries and naming conventions

Quick Start

  1. Read the nearest AGENTS.md and confirm scope and constraints.
  2. Run this skill's Workflow through the Ralph Loop until outcomes are acceptable.
  3. Return the Required Result Format with concrete artifacts and verification evidence.

Workflow

  1. Load the architecture once per test assembly where possible.
  2. Encode a small number of durable, high-value architecture rules first.
  3. Use the test-framework-specific integration package that matches the repo.

Bootstrap When Missing

If ArchUnitNET is not configured yet:

  1. Detect existing setup:
    • rg -n "TngTech\\.ArchUnitNET" -g '*.csproj' .
  2. Add packages to the architecture test project:
    • dotnet add TEST_PROJECT.csproj package TngTech.ArchUnitNET
    • add one framework bridge package: TngTech.ArchUnitNET.xUnit, TngTech.ArchUnitNET.xUnitV3, TngTech.ArchUnitNET.MSTestV2, or TngTech.ArchUnitNET.TUnit
  3. Add at least one durable boundary rule test.
  4. Wire architecture tests into the standard test command in AGENTS.md and CI.
  5. Run dotnet test TEST_PROJECT.csproj and return status: configured or status: improved.
  6. If NetArchTest already covers the same boundary policy and no gap exists, return status: not_applicable.

Deliver

  • architecture tests with richer domain and type modeling
  • architecture-rule commands wired into repo test flow and CI expectations

Validate

Read the full file on GitHub · 102 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 102 lines · 44 tokens per session scan A 6f0d7e2c3236

Subscribe to this mod's changes

mcaf-dotnet-archunitnet is a skill published in the GitHub repository managedcode/dotPilot (23 stars, last pushed 4mo ago), licensed MIT. It adds 44 tokens to every session and 896 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to archunitnet, differing in 10 lines, and is treated as a copy.