/code-quality-refactoring:dotnet-design-pattern-reviewfrom code-quality-refactoring
Reviews C# and .NET code for design pattern quality, SOLID principles, dependency injection, repository/provider abstractions, async practices, and testability without modifying files.
Ships in code-quality-refactoring. 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.
None: SKILL.md is the whole skill.
Review selected C#/.NET code or a solution for pattern fit, architecture, SOLID compliance, async/resource handling, configuration, security, and testability, then return actionable findings without changing files.
Use it for .NET/C# design reviews across a solution/project.
Also match user wording such as .net/c# or net/c design pattern review.
| Pattern | Evidence to look for | Common defect |
|---|---|---|
| Command Pattern | Generic base classes such as CommandHandler<TOptions>, an ICommandHandler<TOptions> interface, CommandHandlerOptions inheritance, and static SetupCommand(IHost host) methods. | Business logic in console parsing or command setup instead of a handler. |
| Factory Pattern | Complex object creation hidden behind factories with service provider integration. | Constructors manually assemble deep dependency graphs or use service locator behavior. |
| Dependency Injection | Primary constructor syntax where appropriate, ArgumentNullException null checks, interface abstractions, and proper service lifetimes. | Singleton captures scoped services, concrete dependencies prevent mocking, or null checks are inconsistent. |
| Repository Pattern | Async data access interfaces and provider abstractions for connections. | Repository exposes provider-specific details or blocks on async calls. |
| Provider Pattern | External service abstractions for database, AI, and other integrations with clear contracts and configuration handling. | Provider leaks SDK types throughout the app or hides errors without structured logging. |
| Resource Pattern | ResourceManager usage with separate .resx files such as LogMessages and ErrorMessages. | User-facing or log messages are hard-coded and cannot be localized or standardized. |
{Core|Console|App|Service}.{Feature}, separation between Core and Console projects, modularity, and readability.Task returns, ResourceManager, structured logging, strongly-typed configuration, and options validation.ConfigureAwait(false) where library code benefits from it, batching, caching, and parallel processing opportunities.Also verify Core/Console boundaries, parameter/return documentation, and self-explanatory naming where public APIs are involved.
| Area | Recommend improvements such as |
|---|---|
| Command Handlers | Validation in base classes, consistent result/error handling, cancellation token flow, resource management, and a predictable SetupCommand(IHost host) boundary. |
| Factories | Dependency configuration, service provider integration without service locator abuse, ownership/disposal rules, and named factory methods. |
| Providers | Connection management, retry/error policy, async methods, exception logging, and clear contracts for database or AI integrations. |
| Configuration | Strongly typed options, data annotations, validation attributes, secure sensitive value handling, and startup validation. |
| AI/ML Integration | Semantic Kernel patterns, structured output handling, model configuration isolation, prompt/input validation, and predictable logging. |
## .NET design pattern review
**Status:** pass | improvements recommended | blocking issues
**Scope:** `<selection, project, or solution>`
| # | Area | Severity | Finding | Evidence | Recommendation |
| --- | --- | --- | --- | --- | --- |
| 1 | `Command Pattern` | High | `<pattern defect>` | `<file/member>` | `<specific change>` |
### Pattern coverage
| Pattern | Present | Quality | Notes |
| --- | --- | --- | --- |
| `Command Pattern` | yes | strong | `<evidence>` |
### Validation
- Code changed: no
- Files reviewed: `<count or list>`
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin code-quality-refactoring9 skills in this plugin
/editorconfigGenerate or update a comprehensive .editorconfig from repository file types and formatting preferences, including indentation, line endings, charset, whitespace, final newline, language globs, and rule-by-rule explanations. Use when asked to create, standardize, or explain EditorConfig./em-dashReview and rewrite code, comments, documentation, and data files to avoid em dashes and en dashes by default. Use this skill when the user asks to remove em dashes, replace Unicode dashes with hyphens, review punctuation in code comments, or enforce ASCII-safe punctuation./quality-playbookRun a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'./refactorImprove existing code through surgical behavior-preserving refactoring. Use this skill when code is hard to understand or maintain, functions or classes are too large, code smells need addressing, adding features is difficult due to structure, or the user asks to clean up, refactor, or improve code without changing behavior./refactor-method-complexity-reduceRefactor a specified method to reduce cognitive complexity to a requested threshold or below by extracting focused helper methods while preserving behavior. Use when the user asks to reduce method complexity, simplify nested conditionals, split large if-else or switch chains, extract validation or type-specific handlers, and verify tests show failed=0./review-and-refactorReview project code against repository instructions, identify maintainability issues, make focused refactorings without splitting existing files, and validate tests when available. Use this skill when the user asks for code cleanup, maintainability review, best-practice refactoring, standards-driven improvements, or a senior engineering pass over existing code.Other plugins' skills for the same job