Agent skill
optimizing-io-operations-lite
Provides essential high-performance I/O patterns. Use when quickly referencing core I/O optimization techniques without detailed explanations.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/optimizing-io-operations-lite
SKILL.md
High-Performance I/O Essentials
1. High-Speed Standard I/O
using var reader = new StreamReader(
Console.OpenStandardInput(),
bufferSize: 65536);
using var writer = new StreamWriter(
Console.OpenStandardOutput(),
bufferSize: 65536);
writer.AutoFlush = false;
// Manual flush after processing
writer.Flush();
2. File I/O
// Sequential read with 64KB buffer
using var stream = new FileStream(
path,
FileMode.Open,
FileAccess.Read,
FileShare.Read,
bufferSize: 64 * 1024,
options: FileOptions.SequentialScan);
3. RandomAccess (.NET 6+)
using var handle = File.OpenHandle(path, FileMode.Open, FileAccess.Read);
int bytesRead = await RandomAccess.ReadAsync(handle, buffer, offset);
4. Performance Comparison
| Method | Relative Performance |
|---|---|
| Console.ReadLine() | 1x |
| StreamReader (64KB) | 3-5x |
| MemoryMappedFile | 5-10x |
For details: See
/dotnet-fast-ioskill
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?