Source profileQuality 62/100

github/awesome-copilot/skills/csharp-async/SKILL.md

csharp-async

Get best practices for C# async programming

Source repository stars
37,126
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Your goal is to help me follow best practices for asynchronous programming in C.

Best for

    Not for

    • Never use .Wait(), .Result, or .GetAwaiter().GetResult() in async code
    • Avoid mixing blocking and async code

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/github/awesome-copilot --skill "skills/csharp-async"
    Safe inspection promptEditorial

    Inspect the Agent Skill "csharp-async" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/csharp-async/SKILL.md at commit 9933dcad5be5caeb288cebcd370eeeb2fc2f1685. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Implementation Patterns

      When reviewing my C code, identify these issues and suggest improvements that follow these best practices.

      Implement the async command pattern for long-running operationsUse async streams (IAsyncEnumerable) for processing sequences asynchronouslyConsider the task-based asynchronous pattern (TAP) for public APIs
    2. 02

      Naming Conventions

      Use the 'Async' suffix for all async methods

      Use the 'Async' suffix for all async methodsMatch method names with their synchronous counterparts when applicable (e.g., GetDataAsync() for GetData())- Use the 'Async' suffix for all async methods - Match method names with their synchronous counterparts when applicable (e.g., GetDataAsync() for GetData())
    3. 03

      Return Types

      Return Task when the method returns a value

      Return Task when the method returns a valueReturn Task when the method doesn't return a valueConsider ValueTask for high-performance scenarios to reduce allocations
    4. 04

      Exception Handling

      Use try/catch blocks around await expressions

      Use try/catch blocks around await expressionsAvoid swallowing exceptions in async methodsUse ConfigureAwait(false) when appropriate to prevent deadlocks in library code

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score62/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars37,126SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    github/awesome-copilot
    Skill path
    skills/csharp-async/SKILL.md
    Commit
    9933dcad5be5caeb288cebcd370eeeb2fc2f1685
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    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() for GetData())

    Return Types

    • Return Task<T> when the method returns a value
    • Return Task when the method doesn't return a value
    • Consider ValueTask<T> for high-performance scenarios to reduce allocations
    • Avoid returning void for 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) 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.