Dotnet Design Pattern Review
GitHubOfficialOriginally contributed by @PlagueHO as prompts/dotnet-design-pattern-review.prompt.md; moved into a skill by pull request #761Distributed by GitHub
- Skill
- Review and audit
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The .NET/C# Design Pattern Review skill provides a structured audit of C# codebases to ensure adherence to established design patterns and .NET development best practices. It evaluates code against specific patterns including Command, Factory, Repository, Provider, and Resource patterns. The review process assesses architectural integrity, SOLID principles, and maintainability, offering actionable feedback without modifying the source code.
What it does
- Identifies the usage of Command, Factory, Repository, and Provider patterns.
- Checks for adherence to SOLID principles and .NET coding standards.
- Evaluates architectural structure, including namespace conventions and separation of concerns.
- Reviews implementation of primary constructors, async/await patterns, and resource management.
- Provides actionable recommendations for improving testability, security, and documentation.
- Analyzes integration patterns for AI/ML components and configuration handling.
When to use it
- When auditing a C# project for architectural consistency and design pattern alignment.
- During code reviews to ensure adherence to .NET best practices and SOLID principles.
- When refactoring complex object creation or data access layers.
- To verify that dependencies are correctly abstracted and mockable for testing.
Advantages
- Ensures consistent application of design patterns across the codebase.
- Promotes clean code practices and maintainable architectural structures.
- Provides specific, actionable feedback tailored to .NET development.
- Helps identify potential improvements in testability and error handling.
Usage examples
- “Review my current Command Handler implementation for adherence to the required base class structure.”
- The agent will analyze the provided code against the Command Pattern requirements and suggest improvements for validation and error handling.
- “Audit this repository layer for SOLID principle violations and async/await best practices.”
- The agent will provide a detailed report on the repository's interface abstractions, connection management, and task-based asynchronous patterns.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/github/dotnet-design-pattern-review/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip dotnet-design-pattern-review.zip -d .agents/skills
Documentation by PlagueHO
.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,CommandHandlerOptionsinheritance, staticSetupCommand(IHost host)methodsFactory Pattern: Complex object creation service provider integration
Dependency Injection: Primary constructor syntax,
ArgumentNullExceptionnull checks, interface abstractions, proper service lifetimesRepository 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.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.2 KiB
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md3.2 KiB
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Originally contributed by
@PlagueHOas prompts/dotnet-design-pattern-review.prompt.mdmoved into a skill by pull request #761
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · skills/dotnet-design-pattern-review · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- PlagueHO
AutoGineer is not affiliated with or endorsed by PlagueHO or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download dotnet-design-pattern-review.zip