{"id":"6efbbe48-76c7-43bf-a409-763309430059","shortId":"svhWZE","kind":"skill","title":"csharp-async","tagline":"Get best practices for C# async programming","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","agent-skills","agents","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"capabilities":["skill","source-github","skill-csharp-async","topic-agent-skills","topic-agents","topic-awesome","topic-custom-agents","topic-github-copilot","topic-hacktoberfest","topic-prompt-engineering"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/csharp-async","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add github/awesome-copilot","source_repo":"https://github.com/github/awesome-copilot","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 33270 github stars · SKILL.md body (1,774 chars)","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-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:09.084Z","embedding":null,"createdAt":"2026-04-18T20:25:44.415Z","updatedAt":"2026-05-18T18:52:09.084Z","lastSeenAt":"2026-05-18T18:52:09.084Z","tsv":"'alloc':82 'alway':195 'api':231 'applic':48 'appropri':111 'around':98 'async':3,9,12,34,38,87,105,126,177,183,188,205,214 'async/await':152 'asynchron':26,220,226 'avoid':83,101,150,179 'await':99,196 'base':225 'best':5,14,23,246 'block':97,181 'c':8,11,29,235 'cancel':160 'code':117,178,184,236 'command':206 'common':167 'complet':148 'configureawait':108 'consid':73,159,221 'convent':31 'counterpart':46 'creat':187 'csharp':2 'csharp-async':1 'deadlock':114 'doesn':68 'e.g':49 'event':91,193 'except':89,93,103,119,191 'execut':135 'express':100 'fals':109 'first':147 'follow':22,244 'get':4 'getawait':174 'getdata':52 'getdataasync':50 'getresult':175 'goal':17 'handl':94 'handler':92,194 'help':20 'high':77 'high-perform':76 'iasyncenumer':216 'identifi':237 'implement':142,201,203 'improv':242 'instead':122 'issu':239 'librari':116 'long':164,210 'long-run':163,209 'match':40 'method':39,41,59,67,88,106,129,190,200 'mix':180 'multipl':137 'name':30,42 'never':169 'oper':166,212 'parallel':134 'pass':155 'pattern':202,207,227 'perform':78,130 'pitfal':168 'practic':6,15,24,247 'prevent':113 'process':218 'program':10,13,27 'propag':118 'public':230 'reduc':81 'result':158,172 'return':53,55,60,63,70,84,128,199 'review':233 'run':165,211 'scenario':79 'sequenc':219 'simpli':154 'skill' 'skill-csharp-async' 'source-github' 'stream':215 'suffix':35 'suggest':241 'swallow':102 'synchron':45 'take':145 'tap':228 'task':56,64,127,138,149,157,198,224 'task-bas':223 'task-return':197 'task.fromexception':121 'task.whenall':132 'task.whenany':140 'throw':124 'timeout':143 'token':161 'topic-agent-skills' 'topic-agents' 'topic-awesome' 'topic-custom-agents' 'topic-github-copilot' 'topic-hacktoberfest' 'topic-prompt-engineering' 'try/catch':96 'type':54 'unnecessari':151 'use':32,95,107,131,139,170,213 'valu':62,72 'valuetask':74 'void':85,189 'wait':171","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-05-18T18:52:09.084Z"},{"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-05-07T22:40:17.826Z"}],"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","github":{"repo":"github/awesome-copilot","stars":33270,"topics":["agent-skills","agents","ai","awesome","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"license":"mit","html_url":"https://github.com/github/awesome-copilot","pushed_at":"2026-05-18T01:26:59Z","description":"Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.","skill_md_sha":"4dbe78b0b1d64272da25e1127830fcdbb31f9dc5","skill_md_path":"skills/csharp-async/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/github/awesome-copilot/tree/main/skills/csharp-async"},"layout":"multi","source":"github","category":"awesome-copilot","frontmatter":{"name":"csharp-async","description":"Get best practices for C# async programming"},"skills_sh_url":"https://skills.sh/github/awesome-copilot/csharp-async"},"updatedAt":"2026-05-18T18:52:09.084Z"}}