본문으로 건너뛰기
Skillpedia
일반 코딩40k · #7151

csharp-async

하는 일

이 AI 에이전트는 비동기 프로그래밍에 대한 모범 사례를 따라, 더 효율적이고 안전한 C# 코드를 작성하도록 돕습니다. 코드가 빠르고 흔한 오류를 피하는지 확인합니다.

사용하는 경우

  • ✓멈추지 않고 여러 작업을 동시에 해야 하는 C# 코드를 작성할 때.
  • ✓프로그램이 더 빨리 반응하기를 원할 때.
  • ✓오래 걸리는 작업을 다루는 C# 코드에서 흔한 실수를 피하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/csharp-async/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/csharp-async/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 C# 코드를 검토하고, 비동기 프로그래밍을 올바르게 사용하고 있는지 알려 주세요: [여기에 C# 코드 입력]”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 코드를 C# 비동기 프로그래밍을 위한 규칙과 권장 사항에 비교합니다. 이름 짓기, 오류 처리, 성능을 개선할 수 있는 곳을 찾고 흔한 함정을 피하도록 짚어 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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<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.

자주 묻는 질문

비동기 프로그래밍이란 무엇인가요?

데이터를 인터넷에서 가져오는 것처럼 시간이 오래 걸리는 작업이 끝나기를 기다리면서, 그냥 멈춰 있지 않고 다른 일을 할 수 있도록 코드를 작성하는 방식입니다.

왜 모범 사례를 따라야 하나요?

모범 사례를 따르면 코드가 더 빠르고, 이해하기 쉽고, 버그가 적고, 여러분이나 다른 프로그래머가 유지보수하기 쉬워집니다.

‘데드락’이란 무엇인가요?

두 개 이상의 코드 부분이 서로를 무한히 기다려서 프로그램이 멈춰 버리는 상황입니다.

상세 정보

작성자의 원본 설명

Get best practices for C# async programming

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7151
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬