Agent skill
dotnet-pipelines-lite
System.IO.Pipelines 핵심 패턴
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/dotnet-pipelines-lite
SKILL.md
Pipelines 핵심
1. 기본 패턴
using System.IO.Pipelines;
var pipe = new Pipe();
// Writer와 Reader 동시 실행
await Task.WhenAll(
FillPipeAsync(stream, pipe.Writer),
ReadPipeAsync(pipe.Reader)
);
2. Writer
private async Task FillPipeAsync(Stream stream, PipeWriter writer)
{
while (true)
{
Memory<byte> memory = writer.GetMemory(512);
int bytesRead = await stream.ReadAsync(memory);
if (bytesRead == 0) break;
writer.Advance(bytesRead);
await writer.FlushAsync();
}
await writer.CompleteAsync();
}
3. Reader
private async Task ReadPipeAsync(PipeReader reader)
{
while (true)
{
ReadResult result = await reader.ReadAsync();
ProcessBuffer(result.Buffer);
reader.AdvanceTo(result.Buffer.End);
if (result.IsCompleted) break;
}
await reader.CompleteAsync();
}
4. 주의사항
- ⚠️ ReadAsync 후 반드시 AdvanceTo 호출
- ⚠️ Writer/Reader 모두 CompleteAsync 호출 필수
상세 내용:
/dotnet-pipelinesskill 참조
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?