# dotnet-solid-principles

dotnet-solid-principles — a skill for Claude Code that applies SOLID, DRY, and SRP principles in .NET projects. Detects C# anti-patterns and suggests specific refactoring steps.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 112 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-solid-principles/SKILL.md
- Updated: 2026-02-27
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/dotnet-solid-principles

## What it does

This skill analyzes code structure to identify violations of SOLID, DRY, and SRP principles. It provides fixes for common anti-patterns like "God Class" or "Fat Controller," guiding developers through class design and interface contract creation.

The agent uses these principles to improve dependency management and class organization. The tool focuses specifically on class and interface logic, delegating architectural patterns and DI container registration to other specialized skills within the `wshaddix/dotnet-skills` repository.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install wshaddix/dotnet-skills skills/dotnet-solid-principles
```

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-solid-principles -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-solid-principles/SKILL.md

## When to use it
- Identify violations of the Single Responsibility Principle
- Eliminate "God Class" code structures
- Replace conditional chains with the Strategy pattern
- Break down bloated controllers into handler classes

## Example prompts
- Apply SRP to `OrderService` to decouple validation and database logic.
- Review `OrderController` for OCP violations.
- Refactor this module using SOLID principles via `dotnet-solid-principles`.

## Similar
- [solid-principles](https://affpapa.org/en/nevibecode/skills/solid-principles.md) — skill · 611 installs
- [Coding Structure with MVC and SOLID Principles](https://affpapa.org/en/nevibecode/prompts/coding-structure-with-mvc-and-solid-principles.md) — prompt · ★ 178201 repo stars
- [dotnet-architecture-good-practices](https://affpapa.org/en/nevibecode/rules/dotnet-architecture-good-practices.md) — rule · ★ 41430 repo stars
- [optimize-dry-solid-principles-cursorrules-prompt-f](https://affpapa.org/en/nevibecode/rules/optimize-dry-solid-principles-cursorrules-prompt-f.md) — rule · ★ 41178 repo stars
- [solid](https://affpapa.org/en/nevibecode/skills/solid.md) — skill · 3700 installs
- [dotnet-best-practices](https://affpapa.org/en/nevibecode/skills/dotnet-best-practices.md) — skill · 15752 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
