MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Dotnet-Design-Pattern-Review

Dotnet-Design-Pattern-Review是一款code方向的AI技能,核心价值是Review the C#/,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

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

Last verified on: 2026-05-30
mkdir -p ./skills/dotnet-design-pattern-review && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/dotnet-design-pattern-review/SKILL.md -o ./skills/dotnet-design-pattern-review/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

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

🎯 Best For

  • Engineering teams doing code reviews
  • Open source maintainers
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Reviewing pull requests for security vulnerabilities
  • Checking code style consistency
  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Dotnet-Design-Pattern-Review to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does this skill check for OWASP Top 10?

Security-focused review skills often include OWASP checks. Check the skill content for specific vulnerability categories covered.

Is Dotnet-Design-Pattern-Review compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Dotnet-Design-Pattern-Review?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Dotnet-Design-Pattern-Review?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/dotnet-design-pattern-review/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Blindly accepting AI suggestions

Always verify AI-generated review comments. Some suggestions may not apply to your specific codebase conventions.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills