csharp-async

Review C# async code for unsafe patterns and performance improvements.

Updated Aug 26, 2024
One-click install
npx skills add https://github.com/FabienDehopre/my-netatmo-24 --skill csharp-async-fabiendehopre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-async
Source: https://github.com/FabienDehopre/my-netatmo-24/tree/main/.agents/skills/csharp-async
Command: npx skills add https://github.com/FabienDehopre/my-netatmo-24 --skill csharp-async-fabiendehopre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers avoid common C# asynchronous programming mistakes by applying reliable patterns for task handling, exceptions, performance, and maintainable async code.

Core Features & Use Cases

  • Async Best Practices Guidance: Provides recommendations for method naming, return types, cancellation handling, and task-based asynchronous patterns.
  • Code Review Support: Identifies issues such as blocking calls, improper async void usage, missing awaits, and inefficient async flows.
  • Performance Improvements: Suggests approaches like Task.WhenAll, Task.WhenAny, ValueTask usage, and ConfigureAwait considerations for appropriate scenarios.

Quick Start

Ask the skill to review my C# async code and suggest improvements based on best practices.

Frequently Asked Questions about csharp-async

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

FAQPage Schema
How do I fix blocking calls and improper async void usage in C#?

To resolve inefficient or unsafe C# async code, this skill applies reliable patterns for task handling, exception management, and performance optimization during code review, ensuring adherence to proper task-based asynchronous workflows.

What are the best practices for C# asynchronous method naming and return types?

C# asynchronous best practices require adhering to async naming conventions, selecting correct return types, implementing cancellation support, and using Task-based patterns to ensure maintainable and predictable asynchronous code execution.

How do I improve C# async code performance with Task.WhenAll and ValueTask?

You can improve C# async code performance by applying patterns like Task.WhenAll, Task.WhenAny, ValueTask usage, and ConfigureAwait considerations to optimize task-based workflows and reduce asynchronous overhead in appropriate scenarios.

Why does my C# asynchronous code have missing awaits and inefficient flows?

Inefficient or unsafe C# async code patterns arise from improper task handling and missing awaits; resolving them requires applying reliable patterns for task management, exception handling, and performance optimization.

Can I use this to review C# async API design and concurrency patterns?

Yes, you can use this to review C# async API design, concurrency, and task-based workflows, as it evaluates code against best practices for cancellation support, exception handling, and performance-oriented asynchronous implementation.