archunitnet

A guide 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 add architecture tests, configure ArchUnitNET in a project, and check assemblies against naming or dependency rules.
Why use it?
It helps verify boundaries and dependencies between parts of a .NET application when simple checks are not enough.

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/dotnet-skills/archunitnet
Any agent
npx skills add managedcode/dotnet-skills --skill archunitnet
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotnet-skills

Made for: Claude Code, Codex.

Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 982 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00104 $0.00982
Opus 5 $0.00052 $0.00491
Sonnet 5 $0.00021 $0.00196
Haiku 4.5 $0.00010 $0.00098

Measured yesterday against content hash a78a5ee4c1c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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

Copies of this mod

3 near-identical copies found in the catalogue:

catalog/Libraries/ArchUnitNET/skills/archunitnet/SKILL.md · 104 lines

How it starts

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

ArchUnitNET for .NET

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 · 104 lines

Files

What ships with it

4 files 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. yesterday First seen · 104 lines · 104 tokens per session scan A a78a5ee4c1c6

Subscribe to this mod's changes

archunitnet is a skill published in the GitHub repository managedcode/dotnet-skills (477 stars, last pushed 2d ago), licensed MIT. It adds 104 tokens to every session and 982 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

winui-ui-testing

Automated UI testing for Windows desktop apps — generate a batch test script with the winapp ui UI Automation harness, run all tests in one pass, read results. Covers element assertions, interactions, value checking (TextBox, ComboBox, ToggleSwitch), keyboard shortcuts and typing (send-keys), hover, drag-and-drop…

microsoft/win-dev-skills · 122 tokens

pr-review

Multi-dimensional review of a PR or feature branch in microsoft/win-dev-skills. Activate on "review my PR / changes / branch", "vet before pushing", "PR review", "is this ready to merge". Fans out parallel sub-agents over skill content, the skill-vs-tool boundary (solution hierarchy), tool correctness…

microsoft/win-dev-skills · 98 tokens

winui-design

Use when designing, reviewing, or fixing WinUI 3: sample and control discovery with winapp find-ui, layout planning, control choice, Fluent Design alignment, Light/Dark/High Contrast theming, typography, spacing, brushes, accessibility, and XAML data-binding design. Load before authoring new XAML, reviewing UI PRs…

microsoft/win-dev-skills · 119 tokens

winui-dev-workflow

Build and run workflow for WinUI 3 apps with WinApp CLI 0.6+ — project creation with winapp new, project-mode winapp run, BuildAndRun.ps1 analyzer integration, crash diagnosis, and prerequisites. Use when creating, building, running, or fixing build errors in a WinUI 3 project.

microsoft/win-dev-skills · 73 tokens

winui-packaging

MSIX packaging, code signing, and distribution for WinUI 3 apps — build for release, certificate generation (winapp cert generate), certificate trust, code signing (winapp sign), self-contained deployment, CI/CD with GitHub Actions, and Microsoft Store submission. Use when preparing for release, creating MSIX…

microsoft/win-dev-skills · 86 tokens

winui-session-report

Analyze the current or a recent agent session (GitHub Copilot CLI or Claude Code) and generate a diagnostic report. Use only when the user explicitly asks for session feedback, agent debugging, or a review of what happened during a build session. Do not inspect session data automatically.

microsoft/win-dev-skills · 61 tokens