csharp-async
Skill2 starsChanged 3 months agoMITView on GitHub
Get best practices for C# async programming
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 11 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use the 'Async' suffix for all async methods
- Very specific: line 19
Consider ValueTask<T> for high-performance scenarios to reduce allocations
- Very specific: line 20
Avoid returning void for async methods except for event handlers
- Distinctive: line 24
Use try/catch blocks around await expressions
- Distinctive: line 25
Avoid swallowing exceptions in async methods
- Very specific: line 26
Use ConfigureAwait(false) when appropriate to prevent deadlocks in library code
- Very specific: line 31
Use Task.WhenAll() for parallel execution of multiple tasks
- Very specific: line 32
Use Task.WhenAny() for implementing timeouts or taking the first completed task
- Distinctive: line 33
Avoid unnecessary async/await when simply passing through task results
- Distinctive: line 34
Consider cancellation tokens for long-running operations
- Very specific: line 38
Never use .Wait(), .Result, or .GetAwaiter().GetResult() in async code
- Distinctive: line 39
Avoid mixing blocking and async code
- Distinctive: line 40
Don't create async void methods (except for event handlers)
- Distinctive: line 41
Always await Task-returning methods
- Distinctive: line 46
Use async streams (IAsyncEnumerable<T>) for processing sequences asynchronously
- Distinctive: line 47
Consider the task-based asynchronous pattern (TAP) for public APIs
- Distinctive: line 49
When reviewing my C# code, identify these issues and suggest improvements that follow these best practices.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C# Async Programming Best Practices
Your goal is to help me follow best practices for asynchronous programming in C#.
Naming Conventions
- Use the 'Async' suffix for all async methods
- Match method names with their synchronous counterparts when applicable (e.g.,
GetDataAsync()forGetData())
Return Types
- Return
Task<T>when the method returns a value - Return
Taskwhen the method doesn't return a value - Consider
ValueTask<T>for high-performance scenarios to reduce allocations - Avoid returning
voidfor async methods except for event handlers
Exception Handling
- Use try/catch blocks around await expressions
- Avoid swallowing exceptions in async methods
- Use
ConfigureAwait(false)when appropriate to prevent deadlocks in library code - Propagate exceptions with
Task.FromException()instead of throwing in async Task returning methods
Performance
- Use
Task.WhenAll()for parallel execution of multiple tasks - Use
Task.WhenAny()for implementing timeouts or taking the first completed task - Avoid unnecessary async/await when simply passing through task results
- Consider cancellation tokens for long-running operations
Common Pitfalls
- Never use
.Wait(),.Result, or.GetAwaiter().GetResult()in async code - Avoid mixing blocking and async code
- Don't create async void methods (except for event handlers)
- Always await Task-returning methods
Implementation Patterns
- Implement the async command pattern for long-running operations
- Use async streams (IAsyncEnumerable
<T>) for processing sequences asynchronously - Consider the task-based asynchronous pattern (TAP) for public APIs
When reviewing my C# code, identify these issues and suggest improvements that follow these best practices.
Trending
Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data
Other versions4 projects use a version of this.
Word for word · 2
- github/awesome-copilot★ 41k100% same
- itsfatduck/optimizerDuck★ 10k100% same
Edited · 1
- RorroRojas3/maf-agents★ 0100% same
Wrote their own version · 1
- glennawatson/CSharpAgentSkills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository383 other files it gives its agents.
- 37signals-waySkill
- ab-test-analysisSkill
- advisor-orchestrator-workerSkill
- ai-ml-engineeringSkill
- algorithmic-artSkill
- analyze-feature-requestsSkill
- animation-vocabularySkill
- apple-designSkill
- emil-design-engSkill
- find-animation-opportunitiesSkill
- improve-animationsSkill
- pick-ui-librarySkill
- prototypeSkill
- review-animationsSkill
- ansoff-matrixSkill
- api-and-interface-designSkill
- api-design-best-practicesSkill
- app-store-changelogSkill
- auth-authorizationSkill
- beachhead-segmentSkill
- blue-ocean-strategySkill
- brainstorm-experiments-existingSkill
- brainstorm-experiments-newSkill
- brainstorm-ideas-existingSkill
- brainstorm-ideas-newSkill
- brainstorm-okrsSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- bug-hunt-swarmSkill
- business-modelSkill
- canvas-designSkill
- ci-cd-and-automationSkill
- claude-apiSkill
- clean-architectureSkill
- clean-codeSkill
- cli-creatorSkill
- code-review-and-qualitySkill
- code-review-skillSkill
- code-simplificationSkill
- cohort-analysisSkill
- cold-start-problemSkill
- commit-archaeologistSkill
- competitive-battlecardSkill
- competitor-analysisSkill
- contagiousSkill
- context-engineeringSkill
- continuous-discoverySkill
- architecture-blueprint-generatorSkill
- azure-architecture-autopilotSkill
- cli-masterySkill
- codeqlSkill
- conventional-commitSkill
- create-implementation-planSkill
- diagnoseSkill
- dotnet-best-practicesSkill
- draw-io-diagram-generatorSkill
- git-commitSkill
- github-actions-efficiencySkill
- java-springbootSkill
- mcp-cliSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

