Skip to content
Back to skills

Agent Swarm

ASecurity

(Industry standard: Parallel Agent) Parallel multi-agent execution pattern for independent sub-tasks running concurrently across isolated worktrees.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentspythonbashbackend

Works with

  • cli

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill agent-swarm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Swarm?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Swarm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-agent-swarm-agent-plugins-skills/badge)](https://www.skillsdirectory.com/skills/richfrem-agent-swarm-agent-plugins-skills)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-swarm
plugin: agent-orchestration
description: "(Industry standard: Parallel Agent) Parallel multi-agent execution pattern for independent sub-tasks running concurrently across isolated worktrees."
allowed-tools: Bash, Read, Write
---

## Dependencies

Requires Python 3.8+ (standard library only).

---

# Agent Swarm (`agent-swarm`)

Parallel multi-agent execution for batch operations, independent work packages, and mass migrations.

## Contents

- [Dependencies](#dependencies)
- [Constraints](#constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [Engine Optimization](#engine-optimization)
- [References](#references)

## Constraints

- **Independent execution**: Each worker task must be completely independent with zero shared in-memory state.
- **Background stdin**: Append `< /dev/null` to background commands to prevent `SIGTTIN` hangs.
- **Idempotence**: Post-processing commands must be safe to rerun with `--resume`.
- **Concurrency caps**: Limit Copilot CLI to `--workers 2` to prevent throttling; Gemini/Claude supports 5-10.

## Quick start

```bash
# Execute batch job with resume support
python ./scripts/swarm_run.py \
    --engine gemini \
    --job ./resources/jobs/my_job.job.md \
    --files-from checklist.md \
    --resume --workers 5
```

## Workflow

1. **Partition**: Break work into discrete, independent task files with bounded scopes.
2. **Select Engine**: Choose CLI backend (`agy`, `gemini`, `copilot`, `claude`, `llama`).
3. **Dispatch**: Run `swarm_run.py` pointing to the job file and target file list.
4. **Inspect**: Review intermediate logs and resolve failed workers via `--resume`.
5. **Merge**: Run mechanical test suites across all completed worker outputs.

## Verification

```bash
# Validate batch execution completed without orphaned tasks
python ./scripts/swarm_run.py --dry-run --files-from checklist.md
# Run test suite on completed batch outputs
pytest tests/
```

## Engine Optimization

- **Copilot CLI**: Ignores `-p` with stdin; `swarm_run.py` prepends prompt to file content. Concurrency max 2.
- **Gemini / Claude**: Accepts `-p` normally; supports high concurrency (`--workers 5`).
- **Atomic Writes**: If workers write to shared stores, use `fcntl.flock` for atomic file operations.

## References

- [PATTERN_GUIDE.md](references/PATTERN_GUIDE.md) — Comparative loop patterns and architecture.
- [acceptance-criteria.md](references/acceptance-criteria.md) — Verification gates and trigger criteria.
- [fallback-tree.md](references/fallback-tree.md) — Error escalation and checkpoint reconciliation tree.

Files in this skill

  • SKILL.md8.2 KB
  • acceptance-criteria.md775 B
  • assets/resources/agent_swarm.mmd43 B
  • evals/evals.json733 B
  • evals/results.tsv301 B
  • fallback-tree.md1.6 KB
  • references/acceptance-criteria.md42 B
  • references/cheapest_models.json40 B
  • references/cheapest_models.md38 B
  • references/fallback-tree.md36 B
  • requirements.txt22 B
  • scripts/swarm_run.py29 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…