csharp-async

Review C# asynchronous code for blocking calls and incorrect async patterns.

Updated May 16, 2026
One-click install
npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill csharp-async-p-o-ke-nae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-async
Source: https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory/tree/main/.github/skills/csharp-async
Command: npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill csharp-async-p-o-ke-nae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write, review, and refactor C# asynchronous code so it behaves correctly, stays responsive, and avoids common deadlocks and blocking mistakes.

Core Features & Use Cases

  • Async API Design: Choose the right return types and naming patterns for Task-based methods.
  • Concurrency and Performance: Apply Task.WhenAll, Task.WhenAny, cancellation tokens, and other patterns that improve throughput and responsiveness.
  • Code Review Support: Spot async pitfalls such as .Wait(), .Result, async void misuse, swallowed exceptions, and missing ConfigureAwait guidance in library code.

Quick Start

Ask the skill to review your C# async code and suggest best-practice fixes for naming, return types, exception handling, cancellation, and concurrency.

Frequently Asked Questions about csharp-async

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

FAQPage Schema
How do I fix deadlocks and blocking calls in C# async code?

Fix C# async deadlocks by removing blocking calls like .Wait() and .Result, avoiding async void misuse, and applying ConfigureAwait guidance in library code to maintain responsive Task-based workflows.

What are the best return types and naming patterns for C# Task-based methods?

The best return types for C# Task-based methods depend on API design needs, requiring strict adherence to async naming conventions and appropriate return-type selection to ensure predictable asynchronous behavior.

How do I add cancellation tokens to C# asynchronous operations?

Add cancellation tokens to C# asynchronous operations by passing CancellationTokenSource tokens through your Task-based methods, improving throughput and allowing cooperative cancellation during concurrent workflow execution.

Why does async void cause swallowed exceptions in C#?

Async void causes swallowed exceptions in C# because error handling cannot attach to the calling context, making it unsafe for Task-based workflows and risking unobserved asynchronous failures.

Can I use Task.WhenAll for performance tuning in C# library development?

Use Task.WhenAll and Task.WhenAny in C# library development to improve concurrency and performance tuning, executing multiple asynchronous operations concurrently while managing exception handling and cancellation effectively.