Catalog
github/dotnet-design-pattern-review

github

dotnet-design-pattern-review

Review the C#/.NET code for design pattern implementation and suggest improvements.

v1.0Latest
New~806Updated Jun 26, 2026

.NET/C# Design Pattern Review

Review the C#/.NET code in ${selection} for design pattern implementation and suggest improvements for the solution/project. Do not make any changes to the code, just provide a review.

Required Design Patterns

  • Command Pattern: Generic base classes (CommandHandler<TOptions>), ICommandHandler<TOptions> interface, CommandHandlerOptions inheritance, static SetupCommand(IHost host) methods
  • Factory Pattern: Complex object creation service provider integration
  • Dependency Injection: Primary constructor syntax, ArgumentNullException null checks, interface abstractions, proper service lifetimes
  • Repository Pattern: Async data access interfaces provider abstractions for connections
  • Provider Pattern: External service abstractions (database, AI), clear contracts, configuration handling
  • Resource Pattern: ResourceManager for localized messages, separate .resx files (LogMessages, ErrorMessages)

Review Checklist

  • Design Patterns: Identify patterns used. Are Command Handler, Factory, Provider, and Repository patterns correctly implemented? Missing beneficial patterns?
  • Architecture: Follow namespace conventions ({Core|Console|App|Service}.{Feature})? Proper separation between Core/Console projects? Modular and readable?
  • .NET Best Practices: Primary constructors, async/await with Task returns, ResourceManager usage, structured logging, strongly-typed configuration?
  • GoF Patterns: Command, Factory, Template Method, Strategy patterns correctly implemented?
  • SOLID Principles: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion violations?
  • Performance: Proper async/await, resource disposal, ConfigureAwait(false), parallel processing opportunities?
  • Maintainability: Clear separation of concerns, consistent error handling, proper configuration usage?
  • Testability: Dependencies abstracted via interfaces, mockable components, async testability, AAA pattern compatibility?
  • Security: Input validation, secure credential handling, parameterized queries, safe exception handling?
  • Documentation: XML docs for public APIs, parameter/return descriptions, resource file organization?
  • Code Clarity: Meaningful names reflecting domain concepts, clear intent through patterns, self-explanatory structure?
  • Clean Code: Consistent style, appropriate method/class size, minimal complexity, eliminated duplication?

Improvement Focus Areas

  • Command Handlers: Validation in base class, consistent error handling, proper resource management
  • Factories: Dependency configuration, service provider integration, disposal patterns
  • Providers: Connection management, async patterns, exception handling and logging
  • Configuration: Data annotations, validation attributes, secure sensitive value handling
  • AI/ML Integration: Semantic Kernel patterns, structured output handling, model configuration

Provide specific, actionable recommendations for improvements aligned with the project's architecture and .NET best practices.

Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Safety

92

Quality

80

Clarity

85

Completeness

72

Summary

This skill guides an AI agent to perform a static analysis review of C#/.NET code for design pattern implementation and architecture compliance. The agent examines code (without modifying it) against a comprehensive checklist covering Command, Factory, Repository, and Provider patterns, along with SOLID principles, best practices, performance, security, and code clarity.

Detected Capabilities

code analysisfile readingpattern matchingarchitectural reviewdocumentation review

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

design pattern reviewarchitecture auditdotnet best practicescode quality assessmentSOLID principles checkrefactoring preparation

Use Cases

  • Review C# codebase for design pattern correctness before refactoring
  • Audit .NET project architecture against SOLID principles and best practices
  • Identify missing or incorrectly implemented GoF patterns in existing code
  • Validate dependency injection and service provider configuration patterns
  • Assess code maintainability and testability in .NET solutions
  • Review security patterns in data access and credential handling

Quality Notes

  • Clear, well-structured checklist with 13 specific review areas covering design patterns, architecture, best practices, and code quality
  • Comprehensive pattern reference section defines expected implementations for Command, Factory, Dependency Injection, Repository, and Provider patterns
  • Detailed improvement focus areas guide the agent toward actionable recommendations aligned with .NET ecosystem standards
  • Skill explicitly states 'Do not make any changes to the code, just provide a review' — clearly scoped to analysis only with no destructive operations
  • Strong coverage of SOLID principles, security concerns, and performance optimization areas
  • Minor: Would benefit from example code snippets showing good vs. poor pattern implementations to anchor the agent's analysis
  • Minor: No guidance on how to prioritize findings or structure the output report when issues are found across multiple areas
Model: claude-haiku-4-5-20251001Analyzed: Jun 26, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use github/dotnet-design-pattern-review in your dev environment

Command Palette

Search for a command to run...