MCP HubMCP Hub
Вернуться к навыкам

parallel-batch-executor

vamseeachanta
Обновлено Today
17 просмотров
3
2
3
Посмотреть на GitHub
Другоеbashparallelxargsperformancebatchoptimization

О программе

Этот навык позволяет выполнять задачи параллельно в bash с использованием xargs и управления заданиями для значительного повышения производительности. Он идеально подходит для пакетных операций с независимыми элементами, такими как множественные файлы или репозитории, особенно для задач, ограниченных вводом-выводом. Разработчикам следует использовать его, когда порядок не имеет значения, и избегать для задач с зависимостями или требованиями к общим ресурсам.

Быстрая установка

Claude Code

Рекомендуется
Основной
npx skills add vamseeachanta/workspace-hub
Команда плагинаАльтернативный
/plugin add https://github.com/vamseeachanta/workspace-hub
Git клонированиеАльтернативный
git clone https://github.com/vamseeachanta/workspace-hub.git ~/.claude/skills/parallel-batch-executor

Скопируйте и вставьте эту команду в Claude Code для установки этого навыка

Документация

Parallel Batch Executor

When to Use This Skill

Use when:

  • Processing multiple independent files or items
  • Running the same operation across multiple repositories
  • Batch operations that don't depend on each other
  • Need significant performance improvements
  • Operations are I/O bound rather than CPU bound

Avoid when:

  • Tasks have dependencies on each other
  • Order of execution matters
  • Shared resources require synchronization
  • Single task that can't be parallelized

Complete Example: Batch Task Runner

Full implementation from workspace-hub:

#!/bin/bash
# ABOUTME: Batch Task Executor
# ABOUTME: Executes tasks in parallel using the Multi-Provider Orchestrator

set -e

# ─────────────────────────────────────────────────────────────────
# Configuration
# ─────────────────────────────────────────────────────────────────

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ORCHESTRATOR="$SCRIPT_DIR/../routing/orchestrate.sh"
PARALLEL=1
LOG_DIR="$SCRIPT_DIR/logs"

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'


*See sub-skills for full details.*

## Performance Tuning

### Optimal Parallelism

```bash
# CPU-bound tasks: match CPU cores
PARALLEL=$(nproc)

# I/O-bound tasks: 2-4x CPU cores
PARALLEL=$(($(nproc) * 2))

# Network-bound tasks: higher parallelism
PARALLEL=20

# Memory-constrained: limit based on available RAM
AVAILABLE_MB=$(free -m | awk '/^Mem:/{print $7}')
TASK_MB=100  # Estimate per task
PARALLEL=$((AVAILABLE_MB / TASK_MB))

Throttling

# Add delay between task starts
printf '%s\n' "${items[@]}" | xargs -I {} -P "$PARALLEL" bash -c "
    sleep 0.1  # 100ms delay
    process_item \"{}\"
"

Resources


Version History

  • 1.0.0 (2026-01-14): Initial release - extracted from workspace-hub batchtools

Sub-Skills

GitHub репозиторий

vamseeachanta/workspace-hub
Путь: .claude/skills/_core/bash/parallel-batch-executor

Похожие навыки

swarm-advanced

Другое

This skill provides advanced swarm orchestration patterns for complex distributed workflows like research, development, and testing. It enables developers to coordinate multiple specialized agents using both MCP tools and CLI commands for parallel execution. Use it when you need to manage sophisticated multi-agent systems with mesh topologies and coordinated task distribution.

Просмотреть навык

when-optimizing-prompts-use-prompt-architect

Другое

Prompt Architect is a framework for developers to systematically analyze, refine, and optimize prompts using evidence-based techniques. It helps improve AI response quality and consistency by identifying anti-patterns and validating changes through A/B testing. Use it when you need to refactor an underperforming prompt or design a new, effective one from scratch.

Просмотреть навык

deepspeed

Дизайн

This skill provides expert guidance for distributed training using Microsoft's DeepSpeed library. It helps developers implement optimization techniques like ZeRO stages, pipeline parallelism, and mixed-precision training. Use this skill when working with DeepSpeed features, debugging code, or learning best practices for large-scale model training.

Просмотреть навык

performance-analysis

Другое

This skill provides comprehensive performance analysis and bottleneck detection for Claude Flow swarms, helping developers identify optimization opportunities. It offers real-time monitoring, profiling of swarm operations, and generates detailed reports with actionable recommendations. Use this skill when you need to diagnose performance issues and improve the efficiency of your Claude Code applications.

Просмотреть навык