Agent skill
dotnet-async-lite
비동기 프로그래밍 핵심 패턴
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/dotnet-async-lite
SKILL.md
비동기 프로그래밍 핵심
1. Task vs ValueTask
// 일반 비동기: Task 사용
public async Task<Data> LoadAsync() { }
// 캐시 히트 빈번: ValueTask 사용
public ValueTask<Data> GetAsync(string key)
{
if (_cache.TryGetValue(key, out var cached))
return new ValueTask<Data>(cached);
return new ValueTask<Data>(LoadFromDbAsync(key));
}
2. CancellationToken
public async Task<Data> LoadAsync(CancellationToken ct = default)
{
ct.ThrowIfCancellationRequested();
return await _httpClient.GetFromJsonAsync<Data>(url, ct);
}
// 타임아웃
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await LongOperationAsync(cts.Token);
3. 안티패턴
// ❌ async void 금지
public async void BadMethod() { }
// ❌ .Result, .Wait() 금지 (데드락)
var result = GetDataAsync().Result;
// ✅ await 사용
var result = await GetDataAsync();
상세 내용:
/dotnet-asyncskill 참조
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?