{"id":"6efbbe48-76c7-43bf-a409-763309430059","shortId":"svhWZE","kind":"skill","title":"Csharp Async","tagline":"Awesome Copilot skill by Github","description":"# C# Async Programming Best Practices\n\nYour goal is to help me follow best practices for asynchronous programming in C#.\n\n## Naming Conventions\n\n- Use the 'Async' suffix for all async methods\n- Match method names with their synchronous counterparts when applicable (e.g., `GetDataAsync()` for `GetData()`)\n\n## Return Types\n\n- Return `Task<T>` when the method returns a value\n- Return `Task` when the method doesn't return a value\n- Consider `ValueTask<T>` for high-performance scenarios to reduce allocations\n- Avoid returning `void` for async methods except for event handlers\n\n## Exception Handling\n\n- Use try/catch blocks around await expressions\n- Avoid swallowing exceptions in async methods\n- Use `ConfigureAwait(false)` when appropriate to prevent deadlocks in library code\n- Propagate exceptions with `Task.FromException()` instead of throwing in async Task returning methods\n\n## Performance\n\n- Use `Task.WhenAll()` for parallel execution of multiple tasks\n- Use `Task.WhenAny()` for implementing timeouts or taking the first completed task\n- Avoid unnecessary async/await when simply passing through task results\n- Consider cancellation tokens for long-running operations\n\n## Common Pitfalls\n\n- Never use `.Wait()`, `.Result`, or `.GetAwaiter().GetResult()` in async code\n- Avoid mixing blocking and async code\n- Don't create async void methods (except for event handlers)\n- Always await Task-returning methods\n\n## Implementation Patterns\n\n- Implement the async command pattern for long-running operations\n- Use async streams (IAsyncEnumerable<T>) for processing sequences asynchronously\n- Consider the task-based asynchronous pattern (TAP) for public APIs\n\nWhen reviewing my C# code, identify these issues and suggest improvements that follow these best practices.","tags":["csharp","async","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/csharp-async","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T16:40:17.639Z","embedding":null,"createdAt":"2026-04-18T20:25:44.415Z","updatedAt":"2026-04-22T16:40:17.639Z","lastSeenAt":"2026-04-22T16:40:17.639Z","tsv":"'alloc':79 'alway':192 'api':228 'applic':45 'appropri':108 'around':95 'async':2,9,31,35,84,102,123,174,180,185,202,211 'async/await':149 'asynchron':23,217,223 'avoid':80,98,147,176 'await':96,193 'awesom':3 'base':222 'best':11,20,243 'block':94,178 'c':8,26,232 'cancel':157 'category-awesome-copilot' 'code':114,175,181,233 'command':203 'common':164 'complet':145 'configureawait':105 'consid':70,156,218 'convent':28 'copilot':4 'counterpart':43 'creat':184 'csharp':1 'deadlock':111 'doesn':65 'e.g':46 'event':88,190 'except':86,90,100,116,188 'execut':132 'express':97 'fals':106 'first':144 'follow':19,241 'getawait':171 'getdata':49 'getdataasync':47 'getresult':172 'github':7 'goal':14 'handl':91 'handler':89,191 'help':17 'high':74 'high-perform':73 'iasyncenumer':213 'identifi':234 'implement':139,198,200 'improv':239 'instead':119 'issu':236 'librari':113 'long':161,207 'long-run':160,206 'match':37 'method':36,38,56,64,85,103,126,187,197 'mix':177 'multipl':134 'name':27,39 'never':166 'oper':163,209 'parallel':131 'pass':152 'pattern':199,204,224 'perform':75,127 'pitfal':165 'practic':12,21,244 'prevent':110 'process':215 'program':10,24 'propag':115 'public':227 'reduc':78 'result':155,169 'return':50,52,57,60,67,81,125,196 'review':230 'run':162,208 'scenario':76 'sequenc':216 'simpli':151 'skill':5 'source-github' 'stream':212 'suffix':32 'suggest':238 'swallow':99 'synchron':42 'take':142 'tap':225 'task':53,61,124,135,146,154,195,221 'task-bas':220 'task-return':194 'task.fromexception':118 'task.whenall':129 'task.whenany':137 'throw':121 'timeout':140 'token':158 'try/catch':93 'type':51 'unnecessari':148 'use':29,92,104,128,136,167,210 'valu':59,69 'valuetask':71 'void':82,186 'wait':168","prices":[{"id":"2c3ce9ad-b1aa-49b2-9a24-139ea7e399c2","listingId":"6efbbe48-76c7-43bf-a409-763309430059","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:44.415Z"}],"sources":[{"listingId":"6efbbe48-76c7-43bf-a409-763309430059","source":"github","sourceId":"github/awesome-copilot/csharp-async","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/csharp-async","isPrimary":false,"firstSeenAt":"2026-04-18T21:48:58.761Z","lastSeenAt":"2026-04-22T12:52:10.174Z"},{"listingId":"6efbbe48-76c7-43bf-a409-763309430059","source":"skills_sh","sourceId":"github/awesome-copilot/csharp-async","sourceUrl":"https://skills.sh/github/awesome-copilot/csharp-async","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:44.415Z","lastSeenAt":"2026-04-22T16:40:17.639Z"}],"details":{"listingId":"6efbbe48-76c7-43bf-a409-763309430059","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"csharp-async","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/csharp-async"},"updatedAt":"2026-04-22T16:40:17.639Z"}}