What problem does it solve?
This Skill helps developers identify and correct common asynchronous programming mistakes in C#, reducing deadlocks, performance regressions, and incorrect exception handling that arise from improper use of async/await, Task, and related patterns.
Core Features & Use Cases
- Naming and API design: Encourage Async suffixes and consistent sync/async method pairs for public APIs.
- Return type guidance: Recommend Task, Task<T>, and ValueTask<T> where appropriate and avoid async void except for event handlers.
- Exception and cancellation handling: Advise proper try/catch around awaits, propagation of exceptions, use of ConfigureAwait(false) in library code, and CancellationToken usage.
- Performance and patterns: Promote Task.WhenAll/WhenAny for parallelism, avoid blocking calls like .Result or .Wait, and use IAsyncEnumerable for streaming sequences.
Quick Start
Review the provided C# code for async anti-patterns and suggest concrete, safe changes that implement these best practices.