csharp-async

csharp-async is a skill for Claude Code, Codex from boshi-xixixi/TraeSkill. It costs 13 tokens per session (381 once invoked), scanned A, original, MIT.

A guide to asynchronous programming in C#, where work can continue without blocking the current operation. It covers async method names, return types, errors, cancellation, and running tasks together.

In plain words
What is it for?
Use it when writing or reviewing C# methods that wait for I/O, run several operations, handle timeouts, or support cancellation.
Why use it?
It helps prevent common problems such as blocked threads, swallowed errors, and poorly handled long-running work. It also explains when to use common task patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when writing or reviewing C# methods that wait for I/O, run several operations, handle timeouts, or support cancellation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/boshi-xixixi/traeskill/csharp-async
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add boshi-xixixi/TraeSkill --skill csharp-async
Clone the repo
git clone --depth 1 https://github.com/boshi-xixixi/TraeSkill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for csharp-async

README.md
[![agentmods](https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/csharp-async/github.svg)](https://agentmods.dev/skills/boshi-xixixi/traeskill/csharp-async)
Your own site
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/csharp-async"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/csharp-async/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for csharp-async

Your own site · 80×15
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/csharp-async"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/csharp-async.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 381 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.00381
Opus 5.5 $0.00005 $0.00152
Sonnet 5.5 $0.00003 $0.00076
Haiku 4.5 $0.00001 $0.00038

Measured 1mo ago against content hash d52c0812a3e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

csharp-async scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.trae/Skills/.agents/skills/csharp-async/SKILL.md · 50 lines

What it actually says

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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 50 lines · 13 tokens per session scan A d52c0812a3e4

Subscribe to this mod's changes

csharp-async is a skill published in the GitHub repository boshi-xixixi/TraeSkill (278 stars, last pushed 5mo ago), licensed MIT. It adds 13 tokens to every session and 381 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

create-pubsub-dotnet

Creates a Dapr pub/sub app in .NET (publisher, subscriber or both) with declarative, programmatic or streaming subscriptions, run with dapr run or Aspire. Use for "create a pub/sub app in .NET" or "build a Dapr publisher and subscriber in C#". For an existing project use add-pubsub-dotnet.

diagrid-labs/dapr-skills · 79 tokens

create-workflow-dotnet

Creates a Dapr workflow app in .NET, run locally with dapr run. Use for "create a workflow in .NET" or "build a workflow app in C#". For Diagrid Catalyst use the catalyst-ai plugin.

diagrid-labs/dapr-skills · 53 tokens

add-workflow-dotnet

Adds Dapr Workflow to an existing .NET (ASP.NET Core, plain or Aspire) project. Shows a plan for approval, then adds the workflow, activities and management endpoints with targeted edits, building after each. Use for "add a workflow to my .NET project" or "make this process a durable workflow". For a new project use…

diagrid-labs/dapr-skills · 91 tokens

worker-services

Build long-running .NET background services with BackgroundService, Generic Host, graceful shutdown, configuration, logging, and deployment patterns suited to workers and daemons. USE FOR: background services; scheduled workers; hosted services; worker extraction; graceful shutdown, health checks, and service hosting…

managedcode/dotnet-skills · 109 tokens

aspnet-core

Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET. USE FOR: working on ASP.NET Core apps, services, or middleware; changing auth, routing, configuration, hosting, or deployment behavior; deciding…

managedcode/dotnet-skills · 122 tokens

minimal-apis

Design and implement Minimal APIs in ASP.NET Core using handler-first endpoints, route groups, filters, and lightweight composition suited to modern .NET services. USE FOR: building new HTTP APIs in ASP.NET Core; creating lightweight microservices; choosing between Minimal APIs and controllers. DO NOT USE FOR…

managedcode/dotnet-skills · 105 tokens