원클릭으로
parallel
Run multiple commands in parallel and aggregate outputs. Load when tasks are independent and can run concurrently.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Run multiple commands in parallel and aggregate outputs. Load when tasks are independent and can run concurrently.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when opening a PR and driving it to green CI — push the branch, write a high-level PR description, watch checks, fix failures, and keep looping until green; also use when an already-open PR gets new commits.
Use when the user starts, resumes, switches, saves, or recalls a named task or ongoing work across sessions (e.g. "remember this", "continue X", "what was I doing on Y", "track this task").
Git commit workflow. Load when finishing any code-change task (after verification) to commit and push, or when explicitly staging/committing.
Use when modifying or adding a transform, loss, model, method, package, task-model, config, docs page, or example in a Lightly AG repo (lightly-ssl or lightly-train) and you need repo-specific conventions.
Spawn a subagent to run a task. Use when you want to delegate work to a separate pi instance.
Use when configuring or replicating LT-DETR v2 (ltdetrv2-s/m/l/x) COCO benchmarks via the lightly-train wrapper — model alias map, global vs per-rank batch size, recipe invariants, ECDet config mapping, cluster pins, and common gotchas.
| name | parallel |
| description | Run multiple commands in parallel and aggregate outputs. Load when tasks are independent and can run concurrently. |
Run independent commands concurrently for efficiency.
mkdir -p /tmp/parallel-work
(ddgs text -q "query1" -m 15 > /tmp/parallel-work/01.txt) &
PID1=$!
(ddgs text -q "query2" -m 15 > /tmp/parallel-work/02.txt) &
PID2=$!
(ddgs text -q "query3" -m 15 > /tmp/parallel-work/03.txt) &
PID3=$!
(ddgs text -q "query4" -m 15 > /tmp/parallel-work/04.txt) &
PID4=$!
wait $PID1 $PID2 $PID3 $PID4
cat /tmp/parallel-work/0*.txt
mkdir -p /tmp/my-temp
(cmd1 > /tmp/my-temp/r1.txt) &
PID1=$!
(cmd2 > /tmp/my-temp/r2.txt) &
PID2=$!
(cmd3 > /tmp/my-temp/r3.txt) &
PID3=$!
wait $PID1 $PID2 $PID3
cat /tmp/my-temp/r*.txt
mkdir -p /tmp/parallel-work
PIDS=()
for item in "${ITEMS[@]}"; do
(process "$item" > "/tmp/parallel-work/r_$item.txt") &
PIDS+=($!)
done
wait "${PIDS[@]}"
cat /tmp/parallel-work/r_*.txt
(timeout 60s cmd > /tmp/my-temp/result.txt) &
(cmd > /tmp/my-temp/r.txt) &
PID=$!
if wait $PID; then
echo "Success"
cat /tmp/my-temp/r.txt
else
echo "Failed with exit code: $?"
fi
| Guideline | Reason |
|---|---|
| Use 4-6 concurrent | Sweet spot for most systems |
| Unique temp dir per run | Avoids file collisions |
| Use absolute paths | Avoids cwd confusion |
Always wait | Ensures all processes finish |
| Parenthesize each bg job | (cmd &) not { cmd & } |
⚠️ Critical: Use subshells for background jobs
Pattern (command > output.txt) & works reliably.
Pattern { command > output.txt & } does NOT work with ddgs.
⚠️ Danger: Temp file race conditions
Never use $$ or variable temp paths in filenames across parallel invocations.