dotnet-patterns

Standardize C# and .NET development with idiomatic patterns and dependency injection.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/vrcms/everything-qwen-code --skill dotnet-patterns-vrcms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-patterns
Source: https://github.com/vrcms/everything-qwen-code/tree/main/.qwen/skills/dotnet-patterns
Command: npx skills add https://github.com/vrcms/everything-qwen-code --skill dotnet-patterns-vrcms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of maintaining code quality and architectural consistency in complex .NET applications by providing standardized patterns for dependency injection, asynchronous programming, and service design.

Core Features & Use Cases

  • Architectural Guidance: Implements clean code principles like immutability, explicit nullability, and dependency inversion.
  • Async/Await Best Practices: Provides templates for non-blocking, concurrent operations and proper cancellation token usage.
  • Use Case: When refactoring a legacy ASP.NET Core service, use this skill to transition from mutable models to immutable records and implement the Result pattern for cleaner error handling.

Quick Start

Apply the dotnet-patterns skill to refactor my current service layer for better dependency injection and async safety.

Frequently Asked Questions about dotnet-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the Result pattern in C# and when should I use it?

Dependency injection in ASP.NET Core separates service instantiation from consumption to enforce inversion of control. Transition legacy service layers by registering immutable records and interfaces in the middleware pipeline, ensuring components remain decoupled and testable.

Why does my async C# service layer block threads and how do I fix it?

Async C# services block threads when operations are synchronous or lack proper cancellation token usage. Fix this by applying async/await best practices, ensuring non-blocking concurrent operations, and propagating cancellation tokens throughout the service implementation.

Does this approach support migrating mutable C# models to immutable records?

Migrating mutable C# models to immutable records is fully supported to enforce clean code principles. This architectural guidance ensures explicit nullability and dependency inversion, making your ASP.NET Core environments more robust and maintainable.

What's the best way to structure middleware pipelines in ASP.NET Core?

Yes, you can refactor legacy code into maintainable C# apps by applying idiomatic patterns and dependency inversion. This standardizes your architecture by transitioning mutable models to immutable records and implementing the Result pattern for error handling.