Agent skill
processing-parallel-tasks-lite
Provides essential parallel processing patterns with Parallel.ForEach and PLINQ. Use when quickly referencing core parallel processing 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/processing-parallel-tasks-lite
SKILL.md
Parallel Processing Essentials
1. Parallel.ForEach
var options = new ParallelOptions
{
MaxDegreeOfParallelism = Environment.ProcessorCount
};
Parallel.ForEach(items, options, item =>
{
ProcessItem(item);
});
2. PLINQ
var results = data
.AsParallel()
.Where(d => d.IsValid)
.Select(d => Transform(d))
.ToList();
3. Thread-Safe Collections
// Collecting results during parallel processing
var results = new ConcurrentBag<Result>();
Parallel.ForEach(data, item =>
{
results.Add(Process(item));
});
4. Important Notes
- CPU-bound: Use Parallel
- I/O-bound: Use async-await
// ❌ Using Parallel for I/O
Parallel.ForEach(urls, url => httpClient.GetAsync(url).Result);
// ✅ Using async-await for I/O
await Task.WhenAll(urls.Select(url => httpClient.GetAsync(url)));
For details: See
/dotnet-parallelskill
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?