Generates architecture tests (NetArchTest/ArchUnitNET) that enforce layering, dependency, naming, and boundary rules as automated fitness functions. Use when you need to codify architectural constraints into build-breaking tests.
Ships in TheCodeMan .NET AI ToolKit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turn architectural rules into automated tests so violations fail the build instead of slowly rotting the codebase — layering, dependencies, naming, and boundary rules tailored to the project.
Works on a target: a solution/project or GitHub URL. Detect the structure to enforce: find <target> -name "*.csproj", and the style (Clean layers? Vertical Slice? modules?) via folder names and references.
dotnet add package NetArchTest.Rules
Clean Architecture dependency rule:
[Fact]
public void Domain_has_no_outward_dependencies()
{
var r = Types.InAssembly(typeof(Order).Assembly)
.Should().NotHaveDependencyOnAny("MyApp.Application", "MyApp.Infrastructure", "MyApp.Api")
.GetResult();
Assert.True(r.IsSuccessful, string.Join("\n", r.FailingTypeNames ?? new()));
}
Other common fitness functions:
// Handlers must be sealed
Types.InAssembly(asm).That().HaveNameEndingWith("Handler").Should().BeSealed();
// Controllers/endpoints don't reference DbContext directly
Types.InAssembly(asm).That().HaveNameEndingWith("Controller").ShouldNot().HaveDependencyOn("MyApp.Infrastructure.Data");
// Modules don't reference each other's internals (modular monolith)
Types.InAssembly(ordersAsm).ShouldNot().HaveDependencyOn("MyApp.Modules.Billing");
// Async methods end with "Async"
Types.InAssembly(asm).That().HaveNameMatching(".*").Should()...; // naming conventions
"Add architecture tests to enforce my layers", "stop controllers from using DbContext", "enforce that handlers are sealed", "guardrail tests for my modular monolith". Pairs with clean-architecture-scaffolder, modular-monolith-generator, and the dotnet-architecture-reviewer agent.
What SKILL.md sets; muted values are Claude Code's defaults
/dotnet-ai-toolkit:netarchtest-generatorfrom TheCodeMan .NET AI ToolKit
npx claudepluginhub stefanthecode/dotnet-ai-toolkit --plugin dotnet-ai-toolkit49 skills in this plugin
/adonet-data-access-auditorAudit and fix classic ADO.NET data-access code (SqlConnection / SqlCommand / SqlDataReader / DataSet) on .NET Framework. Use this skill whenever the user shares raw ADO.NET code, a DAL / repository built on SqlCommand, stored-proc calls, string-concatenated SQL, or mentions SQL injection, parameterized queries, connection leaks, "using / Dispose", reading the same column multiple times, transactions, or "why does my old data layer leak connections / is it safe". Always use this skill for classic ADO.NET review instead of answering from memory; it applies a fixed security + correctness + performance checklist and rewrites the code./async-await-auditorAudit C#/.NET code for async/await anti-patterns and concurrency bugs. Use this skill whenever the user shares async C# code or asks about deadlocks, async void, .Result/.Wait(), blocking calls, ConfigureAwait, sync-over-async, fire-and-forget tasks, CancellationToken usage, or "why does my async code hang/deadlock". Always use this skill for async correctness/performance reviews instead of answering from memory; it applies a fixed checklist and rewrites the code./authorization-policy-generatorDesign ASP.NET Core authorization — policy-based, role-based, and claims/requirement-based with custom authorization handlers and resource-based checks. Use this skill whenever the user wants authorization policies, role/claim checks, custom AuthorizationHandler, resource-based authorization, permission checks, or asks "how do I authorize this / policy vs role / restrict this endpoint to X". Always use this skill for authorization requests; it generates policies, handlers, and endpoint wiring.Other plugins' skills for the same job