agent-multi-repo-swarm
Skill2 starsChanged 7 months agoMITView on GitHub
Agent skill for multi-repo-swarm - invoke with $agent-multi-repo-swarm
- Reads credentials
- Installs packages
- Commits and pushes
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 467
Use appropriate sync strategies
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
# 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 eventual2. Repository Discovery
# 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-topology3. Synchronized Operations
# 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"Configuration
Multi-Repo Config File
# .swarm$multi-repo.yml
version: 1
organization: my-org
repositories:
- name: frontend
url: github.com$my-org$frontend
role: ui
agents: [coder, designer, tester]
- name: backend
url: github.com$my-org$backend
role: api
agents: [architect, coder, tester]
- name: shared
url: github.com$my-org$shared
role: library
agents: [analyst, coder]
coordination:
topology: hierarchical
communication: webhook
memory: redis:/$shared-memory
dependencies:
- from: frontend
to: [backend, shared]
- from: backend
to: [shared]Repository Roles
// Define repository roles and responsibilities
{
"roles": {
"ui": {
"responsibilities": ["user-interface", "ux", "accessibility"],
"default-agents": ["designer", "coder", "tester"]
},
"api": {
"responsibilities": ["endpoints", "business-logic", "data"],
"default-agents": ["architect", "coder", "security"]
},
"library": {
"responsibilities": ["shared-code", "utilities", "types"],
"default-agents": ["analyst", "coder", "documenter"]
}
}
}Orchestration Commands
Dependency Management
# Update dependencies across all repos with gh CLI
# Create tracking issue first
TRACKING_ISSUE=$(gh issue create \
--title "Dependency Update: typescript@5.0.0" \
--body "Tracking issue for updating TypeScript across all repositories" \
--label "dependencies,tracking" \
--json number -q .number)
# Get all repos with TypeScript
TS_REPOS=$(gh repo list org --limit 100 --json name | jq -r '.[].name' | \
while read -r repo; do
if gh api repos$org/$repo$contents$package.json 2>$dev$null | \
jq -r '.content' | base64 -d | grep -q '"typescript"'; then
echo "$repo"
fi
done)
# Update each repository
echo "$TS_REPOS" | while read -r repo; do
# Clone and update
gh repo clone org/$repo $tmp/$repo -- --depth=1
cd $tmp/$repo
# Update dependency
npm install --save-dev typescript@5.0.0
# Test changes
if npm test; then
# Create PR
git checkout -b update-typescript-5
git add package.json package-lock.json
git commit -m "chore: Update TypeScript to 5.0.0
Part of #$TRACKING_ISSUE"
git push origin HEAD
gh pr create \
--title "Update TypeScript to 5.0.0" \
--body "Updates TypeScript to version 5.0.0\n\nTracking: #$TRACKING_ISSUE" \
--label "dependencies"
else
# Report failure
gh issue comment $TRACKING_ISSUE \
--body "❌ Failed to update $repo - tests failing"
fi
cd -
doneRefactoring Operations
# Coordinate large-scale refactoring
npx ruv-swarm github multi-repo-refactor \
--pattern "rename:OldAPI->NewAPI" \
--analyze-impact \
--create-migration-guide \
--staged-rolloutSecurity Updates
# Coordinate security patches
npx ruv-swarm github multi-repo-security \
--scan-all \
--patch-vulnerabilities \
--verify-fixes \
--compliance-reportCommunication Strategies
1. Webhook-Based Coordination
// webhook-coordinator.js
const { MultiRepoSwarm } = require('ruv-swarm');
const swarm = new MultiRepoSwarm({
webhook: {
url: 'https:/$swarm-coordinator.example.com',
secret: process.env.WEBHOOK_SECRET
}
});
// Handle cross-repo events
swarm.on('repo:update', async (event) => {
await swarm.propagate(event, {
to: event.dependencies,
strategy: 'eventual-consistency'
});
});2. GraphQL Federation
# Federated schema for multi-repo queries
type Repository @key(fields: "id") {
id: ID!
name: String!
swarmStatus: SwarmStatus!
dependencies: [Repository!]!
agents: [Agent!]!
}
type SwarmStatus {
active: Boolean!
topology: Topology!
tasks: [Task!]!
memory: JSON!
}3. Event Streaming
# Kafka configuration for real-time coordination
kafka:
brokers: ['kafka1:9092', 'kafka2:9092']
topics:
swarm-events:
partitions: 10
replication: 3
swarm-memory:
partitions: 5
replication: 3Advanced Features
1. Distributed Task Queue
# Create distributed task queue
npx ruv-swarm github multi-repo-queue \
--backend redis \
--workers 10 \
--priority-routing \
--dead-letter-queue2. Cross-Repo Testing
# Run integration tests across repos
npx ruv-swarm github multi-repo-test \
--setup-test-env \
--link-services \
--run-e2e \
--tear-down3. Monorepo Migration
# Assist in monorepo migration
npx ruv-swarm github to-monorepo \
--analyze-repos \
--suggest-structure \
--preserve-history \
--create-migration-prsMonitoring & Visualization
Multi-Repo Dashboard
# Launch monitoring dashboard
npx ruv-swarm github multi-repo-dashboard \
--port 3000 \
--metrics "agent-activity,task-progress,memory-usage" \
--real-timeDependency Graph
# Visualize repo dependencies
npx ruv-swarm github dep-graph \
--format mermaid \
--include-agents \
--show-data-flowHealth Monitoring
# Monitor swarm health across repos
npx ruv-swarm github health-check \
--repos "org/*" \
--check "connectivity,memory,agents" \
--alert-on-issuesSynchronization Patterns
1. Eventually Consistent
// Eventual consistency for non-critical updates
{
"sync": {
"strategy": "eventual",
"max-lag": "5m",
"retry": {
"attempts": 3,
"backoff": "exponential"
}
}
}2. Strong Consistency
// Strong consistency for critical operations
{
"sync": {
"strategy": "strong",
"consensus": "raft",
"quorum": 0.51,
"timeout": "30s"
}
}3. Hybrid Approach
// Mix of consistency levels
{
"sync": {
"default": "eventual",
"overrides": {
"security-updates": "strong",
"dependency-updates": "strong",
"documentation": "eventual"
}
}
}Use Cases
1. Microservices Coordination
# Coordinate microservices development
npx ruv-swarm github microservices \
--services "auth,users,orders,payments" \
--ensure-compatibility \
--sync-contracts \
--integration-tests2. Library Updates
# Update shared library across consumers
npx ruv-swarm github lib-update \
--library "org$shared-lib" \
--version "2.0.0" \
--find-consumers \
--update-imports \
--run-tests3. Organization-Wide Changes
# Apply org-wide policy changes
npx ruv-swarm github org-policy \
--policy "add-security-headers" \
--repos "org/*" \
--validate-compliance \
--create-reportsBest Practices
1. Repository Organization
- Clear repository roles and boundaries
- Consistent naming conventions
- Documented dependencies
- Shared configuration standards
2. Communication
- Use appropriate sync strategies
- Implement circuit breakers
- Monitor latency and failures
- Clear error propagation
3. Security
- Secure cross-repo authentication
- Encrypted communication channels
- Audit trail for all operations
- Principle of least privilege
Performance Optimization
Caching Strategy
# Implement cross-repo caching
npx ruv-swarm github cache-strategy \
--analyze-patterns \
--suggest-cache-layers \
--implement-invalidationParallel Execution
# Optimize parallel operations
npx ruv-swarm github parallel-optimize \
--analyze-dependencies \
--identify-parallelizable \
--execute-optimalResource Pooling
# Pool resources across repos
npx ruv-swarm github resource-pool \
--share-agents \
--distribute-load \
--monitor-usageTroubleshooting
Connectivity Issues
# Diagnose connectivity problems
npx ruv-swarm github diagnose-connectivity \
--test-all-repos \
--check-permissions \
--verify-webhooksMemory Synchronization
# Debug memory sync issues
npx ruv-swarm github debug-memory \
--check-consistency \
--identify-conflicts \
--repair-statePerformance Bottlenecks
# Identify performance issues
npx ruv-swarm github perf-analysis \
--profile-operations \
--identify-bottlenecks \
--suggest-optimizationsExamples
Full-Stack Application Update
# Update full-stack application
npx ruv-swarm github fullstack-update \
--frontend "org$web-app" \
--backend "org$api-server" \
--database "org$db-migrations" \
--coordinate-deploymentCross-Team Collaboration
# Facilitate cross-team work
npx ruv-swarm github cross-team \
--teams "frontend,backend,devops" \
--task "implement-feature-x" \
--assign-by-expertise \
--track-progressSee also: swarm-pr.md, project-board-sync.md
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Other versions5 projects use a version of this.
Word for word · 4
- ruvnet/ruflo★ 79k100% same
- ruvnet/claude-flow★ 76k100% same
- jpoindexter/theft-kit★ 1100% same
- Soulcynics404/AgentForge★ 1100% same
Edited · 1
- fidgetcoding/fidgetflo★ 197% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository139 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- v2/CLAUDE.mdCLAUDE.md
- v3/CLAUDE.mdCLAUDE.md
- agent-adaptive-coordinatorSkill
- agent-agentic-paymentsSkill
- agent-agentSkill
- agent-analyze-code-qualitySkill
- agent-app-storeSkill
- agent-architectureSkill
- agent-arch-system-designSkill
- agent-authenticationSkill
- agent-automation-smart-agentSkill
- agent-base-template-generatorSkill
- agent-benchmark-suiteSkill
- agent-byzantine-coordinatorSkill
- agent-challengesSkill
- agent-code-analyzerSkill
- agent-code-goal-plannerSkill
- agent-code-review-swarmSkill
- agent-coderSkill
- agent-collective-intelligence-coordinatorSkill
- agent-consensus-coordinatorSkill
- agent-coordinationSkill
- agent-coordinator-swarm-initSkill
- agent-crdt-synchronizerSkill
- agent-data-ml-modelSkill
- AgentDB Advanced FeaturesSkill
- AgentDB Learning PluginsSkill
- AgentDB Memory PatternsSkill
- AgentDB Performance OptimizationSkill
- AgentDB Vector SearchSkill
- agent-dev-backend-apiSkill
- agent-docs-api-openapiSkill
- agent-github-modesSkill
- agent-github-pr-managerSkill
- agent-goal-plannerSkill
- agent-gossip-coordinatorSkill
- agent-hierarchical-coordinatorSkill
- agentic-jujutsuSkill
- agent-implementer-sparc-coderSkill
- agent-issue-trackerSkill
- agent-load-balancerSkill
- agent-matrix-optimizerSkill
- agent-memory-coordinatorSkill
- agent-mesh-coordinatorSkill
- agent-migration-planSkill
- agent-neural-networkSkill
- agent-ops-cicd-githubSkill
- agent-orchestrator-taskSkill
- agent-pagerank-analyzerSkill
- agent-paymentsSkill
- agent-performance-analyzerSkill
- agent-performance-benchmarkerSkill
- agent-performance-monitorSkill
- agent-performance-optimizerSkill
- agent-plannerSkill
- agent-pr-managerSkill
- agent-production-validatorSkill
- agent-project-board-syncSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

