Skip to content
Agentmart
Submit a tool

csharp-async-patterns

Async, cancellation, and error handling patterns for C# in Unified Unity MCP.

Skill by AndreySkyFoxSidorov

IndexedMIT★ 27
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/andreyskyfoxsidorov-csharp-async-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Async, cancellation, and error handling patterns for C# in Unified Unity MCP. Use when adding Task-based work, background operations, HTTP handling, editor polling, or cancellation paths.

Use cases: productivity, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/csharp-async-patterns

What's inside

Skill name
csharp-async-patterns
Description
Async, cancellation, and error handling patterns for C# in Unified Unity MCP. Use when adding Task-based work, background operations, HTTP handling, editor polling, or cancellation paths.
License
MIT
Instructions
35 lines in SKILL.md · view on GitHub

Files (4)

  • SKILL.md
  • anti-patterns.md · references/
  • best-practices.md · references/
  • code-examples.md · references/

SKILL.md (first lines)

# C# Async Patterns

## Use This Skill When

- Adding or reviewing `Task`, `async`, cancellation, timeout, or background work.
- Touching HTTP transport or long-running MCP tool execution.
- Bridging background request handling with Unity main-thread APIs.

## Rules

- Do not add async code unless the operation is truly asynchronous.
- Prefer `CancellationToken` for operations that can outlive the request, editor state, or object lifetime.
- Avoid `async void` except for Unity or .NET event handlers that require it.
- Keep Unity API calls on the Unity main thread.
- Do not call Unity APIs from HTTP/background threads.
- Do not introduce UniTask or third-party async libraries unless the project already depends on them and the task requires them.
- Do not use `switch`.

## Error Handling

- Catch errors at the protocol or tool boundary and return structured MCP errors.
- Preserve useful exception messages in logs, but do not leak secrets or local-only paths into public docs.
- Cancel cleanly when the client disconnects or the operation is no longer valid.

## ConfigureAwait

- In Unity Editor code, prioritize correct main-thread behavior over blanket `ConfigureAwait(false)`.
- Use `ConfigureAwait(false)` only in pure .NET helper code that does not resume onto Unity APIs.
- After background work, marshal back to Unity main thread before touching Unity objects.

## References

Legacy reference files under `references/` are background. Update any old naming or style examples before using them.

From AndreySkyFoxSidorov/UnifiedUnityMCP, MIT.

More from AndreySkyFoxSidorov/UnifiedUnityMCP

Signals

Stars
27
Forks
5
Open issues
0
Last commit (this folder)
May 20, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from AndreySkyFoxSidorov

Cite this page

csharp-async-patterns skill. Agent Mart. https://agentmart.dev/skills/andreyskyfoxsidorov-csharp-async-patterns (last updated 2026-10-24)