بنقرة واحدة
csharp-async
Get best practices for C# async programming
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Get best practices for C# async programming
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.
Create ASP.NET Minimal API endpoints with proper OpenAPI documentation
Ensure that C# types are documented with XML comments and follow best practices for documentation.
Design .NET types for performance. Seal classes, use readonly structs, prefer static pure functions, avoid premature enumeration, and choose the right collection types.
Microsoft.Extensions.Options patterns including IValidateOptions, strongly-typed settings, validation on startup, and the Options pattern for clean configuration management.
Use when configuring Playwright BDD projects, setting up defineBddConfig(), configuring feature and step file paths, and integrating with Playwright config.
| name | csharp-async |
| description | Get best practices for C# async programming |
Your goal is to help me follow best practices for asynchronous programming in C#.
GetDataAsync() for GetData())Task<T> when the method returns a valueTask when the method doesn't return a valueValueTask<T> for high-performance scenarios to reduce allocationsvoid for async methods except for event handlersConfigureAwait(false) when appropriate to prevent deadlocks in library codeTask.FromException() instead of throwing in async Task returning methodsTask.WhenAll() for parallel execution of multiple tasksTask.WhenAny() for implementing timeouts or taking the first completed task.Wait(), .Result, or .GetAwaiter().GetResult() in async codeWhen reviewing my C# code, identify these issues and suggest improvements that follow these best practices.