# dotnet-architecture-patterns

dotnet-architecture-patterns guides scalable .NET Minimal API architecture using vertical slices, route groups, endpoint filters, and structured error handling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 125 installs · ★ 92 repo stars
- Author: wshaddix
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/wshaddix/dotnet-skills/tree/HEAD/skills/dotnet-architecture-patterns/SKILL.md
- Updated: 2026-02-27
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/dotnet-architecture-patterns

## What it does

This skill guides the AI assistant to structure .NET applications around vertical slices instead of generic technical layers. Each feature folder encapsulates its own endpoint, input contract, validator, and execution handler, preventing cross-domain coupling across development teams.

It establishes clean Minimal API conventions using `MapGroup` routing, custom `IEndpointFilter` implementations, and explicit middleware ordering. Error workflows rely on RFC 9457 Problem Details and typed `Result<T>` records rather than throwing exceptions for business validation failures.

Detailed dependency injection registrations and async pipeline mechanics are intentionally outside this skill's scope, meaning service lifetimes require separate reference patterns.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-architecture-patterns -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/dotnet-architecture-patterns/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dotnet-architecture-patterns/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-architecture-patterns -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dotnet-architecture-patterns/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-architecture-patterns -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dotnet-architecture-patterns/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install wshaddix/dotnet-skills skills/dotnet-architecture-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/dotnet-architecture-patterns/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-architecture-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/dotnet-architecture-patterns
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dotnet-architecture-patterns/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-architecture-patterns -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/wshaddix/dotnet-skills/tree/HEAD/skills/dotnet-architecture-patterns/SKILL.md

## When to use it
- Structure .NET Minimal APIs using vertical slice architecture
- Group endpoints cleanly using the `MapGroup` pattern
- Add validation filters using `IEndpointFilter`
- Implement RFC 9457 Problem Details and typed Result responses

## Example prompts
- Organize the order creation feature into a vertical slice with its own handler and endpoint
- Set up endpoint filters to validate incoming requests on this route group
- Refactor domain failure handling from exceptions to the Result pattern

## Similar
- [dotnet-backend-patterns](https://affpapa.org/en/nevibecode/skills/dotnet-backend-patterns.md) — skill · 19076 installs
- [dotnet-core-expert](https://affpapa.org/en/nevibecode/skills/dotnet-core-expert.md) — skill · 5100 installs
- [dotnet-architecture-good-practices](https://affpapa.org/en/nevibecode/rules/dotnet-architecture-good-practices.md) — rule · ★ 41430 repo stars
- [dotnet-patterns](https://affpapa.org/en/nevibecode/skills/dotnet-patterns.md) — skill · 6300 installs
- [dotnet-inspect](https://affpapa.org/en/nevibecode/skills/dotnet-inspect.md) — skill · 516 installs
- [dotnet-inspect-compatibility](https://affpapa.org/en/nevibecode/skills/dotnet-inspect-compatibility.md) — skill · 412 installs

From the same set: [wshaddix/dotnet-skills](https://affpapa.org/en/nevibecode/by/wshaddix/dotnet-skills.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
