
Agent Multi Repo Swarm
Orchestrate Claude Flow swarms across many GitHub repos with gh-authenticated hooks, PR sync, and org-wide task routing from one agent session.
Overview
Agent Multi-Repo Swarm is an agent skill most often used in Operate (also Build integrations, Ship review) that coordinates Claude Flow swarms and GitHub operations across multiple repositories.
Install
npx skills add https://github.com/ruvnet/ruflo --skill agent-multi-repo-swarmWhat is this skill?
- Pre-hooks enforce gh auth, git context, and repo list access before swarm work starts
- MCP Claude Flow tools for swarm_init, agent_spawn, task_orchestrate, swarm_status, and memory_usage
- GitHub-focused analyzers and coordinators: repo analyze, PR manage, sync_coord, and metrics
- Cross-repo initialization pattern listing org repositories via gh for fleet-wide automation
- Post-hooks surface open PRs, recent commits, and repo metadata for continuity
- Pre-hook checks gh auth, git status, and repo list access
- Post-hook samples up to 5 open PRs and 5 recent commits
Adoption & trust: 633 installs on skills.sh; 58.5k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You automate in one repo at a time while your org has many active PRs and no single orchestration layer for agent tasks across them.
Who is it for?
Indie studios or technical founders managing a GitHub org with multiple services who already use Claude Code and Claude Flow MCP.
Skip if: Builders on a single pet repo without gh org access, or anyone who cannot grant shell, git, and GitHub API permissions to the agent.
When should I use this skill?
Cross-repository swarm orchestration for organization-wide automation and intelligent collaboration is required; invoke with $agent-multi-repo-swarm.
What do I get? / Deliverables
You initialize and run a cross-repo swarm with authenticated gh hooks, spawned agents, orchestrated tasks, and refreshed PR/repo telemetry in one workflow.
- Initialized multi-repo swarm configuration and agent spawn plan
- Orchestrated task status and GitHub PR/repo metric snapshots
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Operate is the canonical shelf because cross-repo orchestration is how you run production-grade automation after products exist—not a one-shot scaffold task. Infra covers multi-repository coordination, GitHub org access patterns, and swarm initialization that keeps services and repos aligned.
Where it fits
List all org repos with gh, initialize a swarm, and assign maintenance tasks per repository nightly.
Spawn agents to analyze dependent repos before merging an API change that touches shared libraries.
Pull open PRs across repos post-orchestration and align github_sync_coord before a coordinated release.
How it compares
Use instead of single-repo agent prompts when you need fleet-level spawn/orchestrate primitives, not a generic 'review my PR' skill.
Common Questions / FAQ
Who is agent-multi-repo-swarm for?
Technical solo builders and small teams running multiple GitHub repositories who want Claude Flow swarm orchestration with enforced gh authentication.
When should I use agent-multi-repo-swarm?
Use it in Operate infra for org-wide automation, during Build integrations when wiring cross-repo agents, and in Ship review when coordinating open PRs and sync across repositories.
Is agent-multi-repo-swarm safe to install?
It requests broad shell, git, and GitHub access via hooks; check the Security Audits panel on this page and restrict repo scope before enabling in production orgs.
SKILL.md
READMESKILL.md - Agent Multi Repo Swarm
--- name: multi-repo-swarm description: Cross-repository swarm orchestration for organization-wide automation and intelligent collaboration type: coordination color: "#FF6B35" tools: - Bash - Read - Write - Edit - Glob - Grep - LS - TodoWrite - mcp__claude-flow__swarm_init - mcp__claude-flow__agent_spawn - mcp__claude-flow__task_orchestrate - mcp__claude-flow__swarm_status - mcp__claude-flow__memory_usage - mcp__claude-flow__github_repo_analyze - mcp__claude-flow__github_pr_manage - mcp__claude-flow__github_sync_coord - mcp__claude-flow__github_metrics hooks: pre: - "gh auth status || (echo 'GitHub CLI not authenticated' && exit 1)" - "git status --porcelain || echo 'Not in git repository'" - "gh repo list --limit 1 >$dev$null || (echo 'No repo access' && exit 1)" post: - "gh pr list --state open --limit 5 | grep -q . && echo 'Active PRs found'" - "git log --oneline -5 | head -3" - "gh repo view --json name,description,topics" --- # Multi-Repo Swarm - Cross-Repository Swarm Orchestration ## Overview Coordinate AI swarms across multiple repositories, enabling organization-wide automation and intelligent cross-project collaboration. ## Core Features ### 1. Cross-Repo Initialization ```bash # Initialize multi-repo swarm with gh CLI # List organization repositories REPOS=$(gh repo list org --limit 100 --json name,description,languages \ --jq '.[] | select(.name | test("frontend|backend|shared"))') # Get repository details REPO_DETAILS=$(echo "$REPOS" | jq -r '.name' | while read -r repo; do gh api repos$org/$repo --jq '{name, default_branch, languages, topics}' done | jq -s '.') # Initialize swarm with repository context npx ruv-swarm github multi-repo-init \ --repo-details "$REPO_DETAILS" \ --repos "org$frontend,org$backend,org$shared" \ --topology hierarchical \ --shared-memory \ --sync-strategy eventual ``` ### 2. Repository Discovery ```bash # Auto-discover related repositories with gh CLI # Search organization repositories REPOS=$(gh repo list my-organization --limit 100 \ --json name,description,languages,topics \ --jq '.[] | select(.languages | keys | contains(["TypeScript"]))') # Analyze repository dependencies DEPS=$(echo "$REPOS" | jq -r '.name' | while read -r repo; do # Get package.json if it exists if gh api repos$my-organization/$repo$contents$package.json --jq '.content' 2>$dev$null; then gh api repos$my-organization/$repo$contents$package.json \ --jq '.content' | base64 -d | jq '{name, dependencies, devDependencies}' fi done | jq -s '.') # Discover and analyze npx ruv-swarm github discover-repos \ --repos "$REPOS" \ --dependencies "$DEPS" \ --analyze-dependencies \ --suggest-swarm-topology ``` ### 3. Synchronized Operations ```bash # Execute synchronized changes across repos with gh CLI # Get matching repositories MATCHING_REPOS=$(gh repo list org --limit 100 --json name \ --jq '.[] | select(.name | test("-service$")) | .name') # Execute task and create PRs echo "$MATCHING_REPOS" | while read -r repo; do # Clone repo gh repo clone org/$repo $tmp/$repo -- --depth=1 # Execute task cd $tmp/$repo npx ruv-swarm github task-execute \ --task "update-dependencies" \ --repo "org/$repo" # Create PR if changes exist if [[ -n $(git status --porcelain) ]]; then git checkout -b update-dependencies-$(date +%Y%m%d) git add -A git commit -m "chore: Update dependencies" # Push and create PR git push origin HEAD PR_URL=$(gh pr create \ --title "Update dependencies" \ --body "Automated dependency update across services" \ --label "dependencies,automated") echo "$PR_URL" >> $tmp$created-prs.txt fi cd - done # Link related PRs PR_URLS=$(cat $tmp$created-prs.txt) npx ruv-swarm github link-prs --urls "$PR_URLS" ```