New to Claude Skills? Learn how to install them →

github on GitHub

.NET Design Pattern Review

OfficialFree

Enhance your C# code with design pattern insights.

by github37.7k stars on github/awesome-copilot
5 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What .NET Design Pattern Review does

The .NET Design Pattern Review skill provides a structured approach to reviewing C#/.NET code for the proper implementation of design patterns. This skill focuses on analyzing code selections for adherence to established design patterns such as Command, Factory, Repository, and more. By following a comprehensive checklist, the skill offers insights and suggestions for improvement without altering the original code, ensuring that developers receive constructive feedback that aligns with best practices in .NET development.

The review process includes evaluating the architecture of the code, ensuring that it follows namespace conventions and maintains a clear separation of concerns. It checks for compliance with .NET best practices, such as the use of primary constructors, async/await patterns, and structured logging. Additionally, the skill assesses the implementation of the Gang of Four (GoF) patterns and SOLID principles to identify any violations that could affect the maintainability and scalability of the code.

This skill is designed for developers and teams looking to enhance their C#/.NET projects by ensuring that their code is not only functional but also adheres to industry standards. It is particularly useful for code reviews, onboarding new team members, or when refactoring existing codebases. By utilizing this skill, developers can gain a deeper understanding of design patterns and how they can be effectively applied in their projects.

Overall, the .NET Design Pattern Review skill serves as a valuable resource for anyone involved in C#/.NET development, providing actionable recommendations that can lead to improved code quality and project outcomes.

When to use it

Use this skill when conducting code reviews or seeking to enhance the architecture of a C#/.NET project.

When not to use it

This skill is not suitable for projects that do not utilize C#/.NET or for those seeking automated code modifications.

What you can build with it

Code Review Session

Integrate this skill into your code review process to ensure adherence to design patterns and best practices.

Onboarding New Developers

Use the skill to help new team members understand design patterns and their proper implementation in C#/.NET.

Refactoring Existing Code

Apply this skill when refactoring to ensure that the updated code follows established design patterns and improves maintainability.

How to install .NET Design Pattern Review

View source

1. Install with the skills CLI

npx skills add github/awesome-copilot/dotnet-design-pattern-review --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by github

.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.

Frequently asked questions about .NET Design Pattern Review

Similar skills