parallel-batch-executor
Parallel task execution patterns using xargs and job control for significant performance gains
Best use case
parallel-batch-executor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Parallel task execution patterns using xargs and job control for significant performance gains
Teams using parallel-batch-executor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/parallel-batch-executor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How parallel-batch-executor Compares
| Feature / Agent | parallel-batch-executor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Parallel task execution patterns using xargs and job control for significant performance gains
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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:
```bash
#!/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
```bash
# Add delay between task starts
printf '%s\n' "${items[@]}" | xargs -I {} -P "$PARALLEL" bash -c "
sleep 0.1 # 100ms delay
process_item \"{}\"
"
```
## Resources
- [GNU xargs Manual](https://www.gnu.org/software/findutils/manual/html_node/find_html/xargs-options.html)
- [GNU Parallel Tutorial](https://www.gnu.org/software/parallel/parallel_tutorial.html)
- [Bash Process Substitution](https://mywiki.wooledge.org/ProcessSubstitution)
---
## Version History
- **1.0.0** (2026-01-14): Initial release - extracted from workspace-hub batchtools
## Sub-Skills
- [1. Basic Parallel Execution with xargs (+2)](1-basic-parallel-execution-with-xargs/SKILL.md)
- [4. Progress Tracking (+2)](4-progress-tracking/SKILL.md)
- [1. Always Set a Default (+4)](1-always-set-a-default/SKILL.md)Related Skills
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
xitter
Interact with X/Twitter via the x-cli terminal client using official X API credentials. Use for posting, reading timelines, searching tweets, liking, retweeting, bookmarks, mentions, and user lookups.
research-paper-writing
End-to-end pipeline for writing ML/AI research papers — from experiment design through analysis, drafting, revision, and submission. Covers NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Integrates automated experiment monitoring, statistical analysis, iterative writing, and citation verification.
cli-productivity
Essential CLI tools and shell productivity patterns for efficient terminal workflows
usage-tracker
Track and analyze usage metrics with timestamped logging, reporting, and trend detection
state-directory-manager
Manage persistent state directories with XDG-compliant paths and cleanup for bash scripts
json-config-loader
Configuration file parsing patterns for bash scripts (INI, key=value, JSON)
interactive-menu-builder
Build multi-level interactive CLI menus with navigation and selection for bash scripts
git-sync-manager
Multi-repository git synchronization and fetch-pull-push patterns for batch operations across workspaces
complexity-scorer
Score task complexity using keyword matching, heuristic analysis, and configurable threshold rules
bash-cli-framework
Universal bash CLI patterns for colors, logging, headers, and error handling
wave-based-parallel-plan-execution
Orchestrate phase execution by discovering dependencies, grouping into waves, spawning subagents, and collecting results with optional wave filtering