Github Multi Repo
Orchestrate multi-repo development with AI-powered coordination
✨ The solution you've been looking for
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
See It In Action
Interactive preview & real-world examples
AI Conversation Simulator
See how users interact with this skill
User Prompt
I need to update our shared authentication library from v1.2 to v2.0 across all our microservices. Can you coordinate this update, run tests, and create PRs?
Skill Processing
Analyzing request...
Agent Response
Automated analysis of all dependent repositories, coordinated package updates, test execution, and PR creation with proper rollback handling
Quick Start (3 Steps)
Get up and running in minutes
Install
claude-code skill install github-multi-repo
claude-code skill install github-multi-repoConfig
First Trigger
@github-multi-repo helpCommands
| Command | Description | Required Args |
|---|---|---|
| @github-multi-repo microservices-dependency-update | Update a shared library across all microservices while maintaining compatibility | None |
| @github-multi-repo organization-wide-security-patch | Apply security updates across all repositories in an organization | None |
| @github-multi-repo architecture-standardization | Standardize repository structures and workflows across multiple projects | None |
Typical Use Cases
Microservices Dependency Update
Update a shared library across all microservices while maintaining compatibility
Organization-wide Security Patch
Apply security updates across all repositories in an organization
Architecture Standardization
Standardize repository structures and workflows across multiple projects
Overview
GitHub Multi-Repository Coordination Skill
Overview
Advanced multi-repository coordination system that combines swarm intelligence, package synchronization, and repository architecture optimization. This skill enables organization-wide automation, cross-project collaboration, and scalable repository management.
Core Capabilities
🔄 Multi-Repository Swarm Coordination
Cross-repository AI swarm orchestration for distributed development workflows.
📦 Package Synchronization
Intelligent dependency resolution and version alignment across multiple packages.
🏗️ Repository Architecture
Structure optimization and template management for scalable projects.
🔗 Integration Management
Cross-package integration testing and deployment coordination.
Quick Start
Initialize Multi-Repo Coordination
1# Basic swarm initialization
2npx claude-flow skill run github-multi-repo init \
3 --repos "org/frontend,org/backend,org/shared" \
4 --topology hierarchical
5
6# Advanced initialization with synchronization
7npx claude-flow skill run github-multi-repo init \
8 --repos "org/frontend,org/backend,org/shared" \
9 --topology mesh \
10 --shared-memory \
11 --sync-strategy eventual
Synchronize Packages
1# Synchronize package versions and dependencies
2npx claude-flow skill run github-multi-repo sync \
3 --packages "claude-code-flow,ruv-swarm" \
4 --align-versions \
5 --update-docs
Optimize Architecture
1# Analyze and optimize repository structure
2npx claude-flow skill run github-multi-repo optimize \
3 --analyze-structure \
4 --suggest-improvements \
5 --create-templates
Features
1. Cross-Repository Swarm Orchestration
Repository Discovery
1// Auto-discover related repositories with gh CLI
2const REPOS = Bash(`gh repo list my-organization --limit 100 \
3 --json name,description,languages,topics \
4 --jq '.[] | select(.languages | keys | contains(["TypeScript"]))'`)
5
6// Analyze repository dependencies
7const DEPS = Bash(`gh repo list my-organization --json name | \
8 jq -r '.[].name' | while read -r repo; do
9 gh api repos/my-organization/$repo/contents/package.json \
10 --jq '.content' 2>/dev/null | base64 -d | jq '{name, dependencies}'
11 done | jq -s '.'`)
12
13// Initialize swarm with discovered repositories
14mcp__claude-flow__swarm_init({
15 topology: "hierarchical",
16 maxAgents: 8,
17 metadata: { repos: REPOS, dependencies: DEPS }
18})
Synchronized Operations
1// Execute synchronized changes across repositories
2[Parallel Multi-Repo Operations]:
3 // Spawn coordination agents
4 Task("Repository Coordinator", "Coordinate changes across all repositories", "coordinator")
5 Task("Dependency Analyzer", "Analyze cross-repo dependencies", "analyst")
6 Task("Integration Tester", "Validate cross-repo changes", "tester")
7
8 // Get matching repositories
9 Bash(`gh repo list org --limit 100 --json name \
10 --jq '.[] | select(.name | test("-service$")) | .name' > /tmp/repos.txt`)
11
12 // Execute task across repositories
13 Bash(`cat /tmp/repos.txt | while read -r repo; do
14 gh repo clone org/$repo /tmp/$repo -- --depth=1
15 cd /tmp/$repo
16
17 # Apply changes
18 npm update
19 npm test
20
21 # Create PR if successful
22 if [ $? -eq 0 ]; then
23 git checkout -b update-dependencies-$(date +%Y%m%d)
24 git add -A
25 git commit -m "chore: Update dependencies"
26 git push origin HEAD
27 gh pr create --title "Update dependencies" --body "Automated update" --label "dependencies"
28 fi
29 done`)
30
31 // Track all operations
32 TodoWrite { todos: [
33 { id: "discover", content: "Discover all service repositories", status: "completed" },
34 { id: "update", content: "Update dependencies", status: "completed" },
35 { id: "test", content: "Run integration tests", status: "in_progress" },
36 { id: "pr", content: "Create pull requests", status: "pending" }
37 ]}
2. Package Synchronization
Version Alignment
1// Synchronize package dependencies and versions
2[Complete Package Sync]:
3 // Initialize sync swarm
4 mcp__claude-flow__swarm_init({ topology: "mesh", maxAgents: 5 })
5
6 // Spawn sync agents
7 Task("Sync Coordinator", "Coordinate version alignment", "coordinator")
8 Task("Dependency Analyzer", "Analyze dependencies", "analyst")
9 Task("Integration Tester", "Validate synchronization", "tester")
10
11 // Read package states
12 Read("/workspaces/ruv-FANN/claude-code-flow/claude-code-flow/package.json")
13 Read("/workspaces/ruv-FANN/ruv-swarm/npm/package.json")
14
15 // Align versions using gh CLI
16 Bash(`gh api repos/:owner/:repo/git/refs \
17 -f ref='refs/heads/sync/package-alignment' \
18 -f sha=$(gh api repos/:owner/:repo/git/refs/heads/main --jq '.object.sha')`)
19
20 // Update package.json files
21 Bash(`gh api repos/:owner/:repo/contents/package.json \
22 --method PUT \
23 -f message="feat: Align Node.js version requirements" \
24 -f branch="sync/package-alignment" \
25 -f content="$(cat aligned-package.json | base64)"`)
26
27 // Store sync state
28 mcp__claude-flow__memory_usage({
29 action: "store",
30 key: "sync/packages/status",
31 value: {
32 timestamp: Date.now(),
33 packages_synced: ["claude-code-flow", "ruv-swarm"],
34 status: "synchronized"
35 }
36 })
Documentation Synchronization
1// Synchronize CLAUDE.md files across packages
2[Documentation Sync]:
3 // Get source documentation
4 Bash(`gh api repos/:owner/:repo/contents/ruv-swarm/docs/CLAUDE.md \
5 --jq '.content' | base64 -d > /tmp/claude-source.md`)
6
7 // Update target documentation
8 Bash(`gh api repos/:owner/:repo/contents/claude-code-flow/CLAUDE.md \
9 --method PUT \
10 -f message="docs: Synchronize CLAUDE.md" \
11 -f branch="sync/documentation" \
12 -f content="$(cat /tmp/claude-source.md | base64)"`)
13
14 // Track sync status
15 mcp__claude-flow__memory_usage({
16 action: "store",
17 key: "sync/documentation/status",
18 value: { status: "synchronized", files: ["CLAUDE.md"] }
19 })
Cross-Package Integration
1// Coordinate feature implementation across packages
2[Cross-Package Feature]:
3 // Push changes to all packages
4 mcp__github__push_files({
5 branch: "feature/github-integration",
6 files: [
7 {
8 path: "claude-code-flow/.claude/commands/github/github-modes.md",
9 content: "[GitHub modes documentation]"
10 },
11 {
12 path: "ruv-swarm/src/github-coordinator/hooks.js",
13 content: "[GitHub coordination hooks]"
14 }
15 ],
16 message: "feat: Add GitHub workflow integration"
17 })
18
19 // Create coordinated PR
20 Bash(`gh pr create \
21 --title "Feature: GitHub Workflow Integration" \
22 --body "## 🚀 GitHub Integration
23
24### Features
25- ✅ Multi-repo coordination
26- ✅ Package synchronization
27- ✅ Architecture optimization
28
29### Testing
30- [x] Package dependency verification
31- [x] Integration tests
32- [x] Cross-package compatibility"`)
3. Repository Architecture
Structure Analysis
1// Analyze and optimize repository structure
2[Architecture Analysis]:
3 // Initialize architecture swarm
4 mcp__claude-flow__swarm_init({ topology: "hierarchical", maxAgents: 6 })
5
6 // Spawn architecture agents
7 Task("Senior Architect", "Analyze repository structure", "architect")
8 Task("Structure Analyst", "Identify optimization opportunities", "analyst")
9 Task("Performance Optimizer", "Optimize structure for scalability", "optimizer")
10 Task("Best Practices Researcher", "Research architecture patterns", "researcher")
11
12 // Analyze current structures
13 LS("/workspaces/ruv-FANN/claude-code-flow/claude-code-flow")
14 LS("/workspaces/ruv-FANN/ruv-swarm/npm")
15
16 // Search for best practices
17 Bash(`gh search repos "language:javascript template architecture" \
18 --limit 10 \
19 --json fullName,description,stargazersCount \
20 --sort stars \
21 --order desc`)
22
23 // Store analysis results
24 mcp__claude-flow__memory_usage({
25 action: "store",
26 key: "architecture/analysis/results",
27 value: {
28 repositories_analyzed: ["claude-code-flow", "ruv-swarm"],
29 optimization_areas: ["structure", "workflows", "templates"],
30 recommendations: ["standardize_structure", "improve_workflows"]
31 }
32 })
Template Creation
1// Create standardized repository template
2[Template Creation]:
3 // Create template repository
4 mcp__github__create_repository({
5 name: "claude-project-template",
6 description: "Standardized template for Claude Code projects",
7 private: false,
8 autoInit: true
9 })
10
11 // Push template structure
12 mcp__github__push_files({
13 repo: "claude-project-template",
14 files: [
15 {
16 path: ".claude/commands/github/github-modes.md",
17 content: "[GitHub modes template]"
18 },
19 {
20 path: ".claude/config.json",
21 content: JSON.stringify({
22 version: "1.0",
23 mcp_servers: {
24 "ruv-swarm": {
25 command: "npx",
26 args: ["ruv-swarm", "mcp", "start"]
27 }
28 }
29 })
30 },
31 {
32 path: "CLAUDE.md",
33 content: "[Standardized CLAUDE.md]"
34 },
35 {
36 path: "package.json",
37 content: JSON.stringify({
38 name: "claude-project-template",
39 engines: { node: ">=20.0.0" },
40 dependencies: { "ruv-swarm": "^1.0.11" }
41 })
42 }
43 ],
44 message: "feat: Create standardized template"
45 })
Cross-Repository Standardization
1// Synchronize structure across repositories
2[Structure Standardization]:
3 const repositories = ["claude-code-flow", "ruv-swarm", "claude-extensions"]
4
5 // Update common files across all repositories
6 repositories.forEach(repo => {
7 mcp__github__create_or_update_file({
8 repo: "ruv-FANN",
9 path: `${repo}/.github/workflows/integration.yml`,
10 content: `name: Integration Tests
11on: [push, pull_request]
12jobs:
13 test:
14 runs-on: ubuntu-latest
15 steps:
16 - uses: actions/checkout@v3
17 - uses: actions/setup-node@v3
18 with: { node-version: '20' }
19 - run: npm install && npm test`,
20 message: "ci: Standardize integration workflow",
21 branch: "structure/standardization"
22 })
23 })
4. Orchestration Workflows
Dependency Management
1// Update dependencies across all repositories
2[Organization-Wide Dependency Update]:
3 // Create tracking issue
4 TRACKING_ISSUE=$(Bash(`gh issue create \
5 --title "Dependency Update: typescript@5.0.0" \
6 --body "Tracking TypeScript update across all repositories" \
7 --label "dependencies,tracking" \
8 --json number -q .number`))
9
10 // Find all TypeScript repositories
11 TS_REPOS=$(Bash(`gh repo list org --limit 100 --json name | \
12 jq -r '.[].name' | while read -r repo; do
13 if gh api repos/org/$repo/contents/package.json 2>/dev/null | \
14 jq -r '.content' | base64 -d | grep -q '"typescript"'; then
15 echo "$repo"
16 fi
17 done`))
18
19 // Update each repository
20 Bash(`echo "$TS_REPOS" | while read -r repo; do
21 gh repo clone org/$repo /tmp/$repo -- --depth=1
22 cd /tmp/$repo
23
24 npm install --save-dev typescript@5.0.0
25
26 if npm test; then
27 git checkout -b update-typescript-5
28 git add package.json package-lock.json
29 git commit -m "chore: Update TypeScript to 5.0.0
30
31Part of #$TRACKING_ISSUE"
32
33 git push origin HEAD
34 gh pr create \
35 --title "Update TypeScript to 5.0.0" \
36 --body "Updates TypeScript\n\nTracking: #$TRACKING_ISSUE" \
37 --label "dependencies"
38 else
39 gh issue comment $TRACKING_ISSUE \
40 --body "❌ Failed to update $repo - tests failing"
41 fi
42 done`)
Refactoring Operations
1// Coordinate large-scale refactoring
2[Cross-Repo Refactoring]:
3 // Initialize refactoring swarm
4 mcp__claude-flow__swarm_init({ topology: "mesh", maxAgents: 8 })
5
6 // Spawn specialized agents
7 Task("Refactoring Coordinator", "Coordinate refactoring across repos", "coordinator")
8 Task("Impact Analyzer", "Analyze refactoring impact", "analyst")
9 Task("Code Transformer", "Apply refactoring changes", "coder")
10 Task("Migration Guide Creator", "Create migration documentation", "documenter")
11 Task("Integration Tester", "Validate refactored code", "tester")
12
13 // Execute refactoring
14 mcp__claude-flow__task_orchestrate({
15 task: "Rename OldAPI to NewAPI across all repositories",
16 strategy: "sequential",
17 priority: "high"
18 })
Security Updates
1// Coordinate security patches
2[Security Patch Deployment]:
3 // Scan all repositories
4 Bash(`gh repo list org --limit 100 --json name | jq -r '.[].name' | \
5 while read -r repo; do
6 gh repo clone org/$repo /tmp/$repo -- --depth=1
7 cd /tmp/$repo
8 npm audit --json > /tmp/audit-$repo.json
9 done`)
10
11 // Apply patches
12 Bash(`for repo in /tmp/audit-*.json; do
13 if [ $(jq '.vulnerabilities | length' $repo) -gt 0 ]; then
14 cd /tmp/$(basename $repo .json | sed 's/audit-//')
15 npm audit fix
16
17 if npm test; then
18 git checkout -b security/patch-$(date +%Y%m%d)
19 git add -A
20 git commit -m "security: Apply security patches"
21 git push origin HEAD
22 gh pr create --title "Security patches" --label "security"
23 fi
24 fi
25 done`)
Configuration
Multi-Repo Config File
1# .swarm/multi-repo.yml
2version: 1
3organization: my-org
4
5repositories:
6 - name: frontend
7 url: github.com/my-org/frontend
8 role: ui
9 agents: [coder, designer, tester]
10
11 - name: backend
12 url: github.com/my-org/backend
13 role: api
14 agents: [architect, coder, tester]
15
16 - name: shared
17 url: github.com/my-org/shared
18 role: library
19 agents: [analyst, coder]
20
21coordination:
22 topology: hierarchical
23 communication: webhook
24 memory: redis://shared-memory
25
26dependencies:
27 - from: frontend
28 to: [backend, shared]
29 - from: backend
30 to: [shared]
Repository Roles
1{
2 "roles": {
3 "ui": {
4 "responsibilities": ["user-interface", "ux", "accessibility"],
5 "default-agents": ["designer", "coder", "tester"]
6 },
7 "api": {
8 "responsibilities": ["endpoints", "business-logic", "data"],
9 "default-agents": ["architect", "coder", "security"]
10 },
11 "library": {
12 "responsibilities": ["shared-code", "utilities", "types"],
13 "default-agents": ["analyst", "coder", "documenter"]
14 }
15 }
16}
Communication Strategies
1. Webhook-Based Coordination
1const { MultiRepoSwarm } = require('ruv-swarm');
2
3const swarm = new MultiRepoSwarm({
4 webhook: {
5 url: 'https://swarm-coordinator.example.com',
6 secret: process.env.WEBHOOK_SECRET
7 }
8});
9
10swarm.on('repo:update', async (event) => {
11 await swarm.propagate(event, {
12 to: event.dependencies,
13 strategy: 'eventual-consistency'
14 });
15});
2. Event Streaming
1# Kafka configuration for real-time coordination
2kafka:
3 brokers: ['kafka1:9092', 'kafka2:9092']
4 topics:
5 swarm-events:
6 partitions: 10
7 replication: 3
8 swarm-memory:
9 partitions: 5
10 replication: 3
Synchronization Patterns
1. Eventually Consistent
1{
2 "sync": {
3 "strategy": "eventual",
4 "max-lag": "5m",
5 "retry": {
6 "attempts": 3,
7 "backoff": "exponential"
8 }
9 }
10}
2. Strong Consistency
1{
2 "sync": {
3 "strategy": "strong",
4 "consensus": "raft",
5 "quorum": 0.51,
6 "timeout": "30s"
7 }
8}
3. Hybrid Approach
1{
2 "sync": {
3 "default": "eventual",
4 "overrides": {
5 "security-updates": "strong",
6 "dependency-updates": "strong",
7 "documentation": "eventual"
8 }
9 }
10}
Use Cases
1. Microservices Coordination
1npx claude-flow skill run github-multi-repo microservices \
2 --services "auth,users,orders,payments" \
3 --ensure-compatibility \
4 --sync-contracts \
5 --integration-tests
2. Library Updates
1npx claude-flow skill run github-multi-repo lib-update \
2 --library "org/shared-lib" \
3 --version "2.0.0" \
4 --find-consumers \
5 --update-imports \
6 --run-tests
3. Organization-Wide Changes
1npx claude-flow skill run github-multi-repo org-policy \
2 --policy "add-security-headers" \
3 --repos "org/*" \
4 --validate-compliance \
5 --create-reports
Architecture Patterns
Monorepo Structure
ruv-FANN/
├── packages/
│ ├── claude-code-flow/
│ │ ├── src/
│ │ ├── .claude/
│ │ └── package.json
│ ├── ruv-swarm/
│ │ ├── src/
│ │ ├── wasm/
│ │ └── package.json
│ └── shared/
│ ├── types/
│ ├── utils/
│ └── config/
├── tools/
│ ├── build/
│ ├── test/
│ └── deploy/
├── docs/
│ ├── architecture/
│ ├── integration/
│ └── examples/
└── .github/
├── workflows/
├── templates/
└── actions/
Command Structure
.claude/
├── commands/
│ ├── github/
│ │ ├── github-modes.md
│ │ ├── pr-manager.md
│ │ ├── issue-tracker.md
│ │ └── sync-coordinator.md
│ ├── sparc/
│ │ ├── sparc-modes.md
│ │ ├── coder.md
│ │ └── tester.md
│ └── swarm/
│ ├── coordination.md
│ └── orchestration.md
├── templates/
│ ├── issue.md
│ ├── pr.md
│ └── project.md
└── config.json
Monitoring & Visualization
Multi-Repo Dashboard
1npx claude-flow skill run github-multi-repo dashboard \
2 --port 3000 \
3 --metrics "agent-activity,task-progress,memory-usage" \
4 --real-time
Dependency Graph
1npx claude-flow skill run github-multi-repo dep-graph \
2 --format mermaid \
3 --include-agents \
4 --show-data-flow
Health Monitoring
1npx claude-flow skill run github-multi-repo health-check \
2 --repos "org/*" \
3 --check "connectivity,memory,agents" \
4 --alert-on-issues
Best 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
4. Version Management
- Semantic versioning alignment
- Dependency compatibility validation
- Automated version bump coordination
5. Testing Integration
- Cross-package test validation
- Integration test automation
- Performance regression detection
Performance Optimization
Caching Strategy
1npx claude-flow skill run github-multi-repo cache-strategy \
2 --analyze-patterns \
3 --suggest-cache-layers \
4 --implement-invalidation
Parallel Execution
1npx claude-flow skill run github-multi-repo parallel-optimize \
2 --analyze-dependencies \
3 --identify-parallelizable \
4 --execute-optimal
Resource Pooling
1npx claude-flow skill run github-multi-repo resource-pool \
2 --share-agents \
3 --distribute-load \
4 --monitor-usage
Troubleshooting
Connectivity Issues
1npx claude-flow skill run github-multi-repo diagnose-connectivity \
2 --test-all-repos \
3 --check-permissions \
4 --verify-webhooks
Memory Synchronization
1npx claude-flow skill run github-multi-repo debug-memory \
2 --check-consistency \
3 --identify-conflicts \
4 --repair-state
Performance Bottlenecks
1npx claude-flow skill run github-multi-repo perf-analysis \
2 --profile-operations \
3 --identify-bottlenecks \
4 --suggest-optimizations
Advanced Features
1. Distributed Task Queue
1npx claude-flow skill run github-multi-repo queue \
2 --backend redis \
3 --workers 10 \
4 --priority-routing \
5 --dead-letter-queue
2. Cross-Repo Testing
1npx claude-flow skill run github-multi-repo test \
2 --setup-test-env \
3 --link-services \
4 --run-e2e \
5 --tear-down
3. Monorepo Migration
1npx claude-flow skill run github-multi-repo to-monorepo \
2 --analyze-repos \
3 --suggest-structure \
4 --preserve-history \
5 --create-migration-prs
Examples
Full-Stack Application Update
1npx claude-flow skill run github-multi-repo fullstack-update \
2 --frontend "org/web-app" \
3 --backend "org/api-server" \
4 --database "org/db-migrations" \
5 --coordinate-deployment
Cross-Team Collaboration
1npx claude-flow skill run github-multi-repo cross-team \
2 --teams "frontend,backend,devops" \
3 --task "implement-feature-x" \
4 --assign-by-expertise \
5 --track-progress
Metrics and Reporting
Sync Quality Metrics
- Package version alignment percentage
- Documentation consistency score
- Integration test success rate
- Synchronization completion time
Architecture Health Metrics
- Repository structure consistency score
- Documentation coverage percentage
- Cross-repository integration success rate
- Template adoption and usage statistics
Automated Reporting
- Weekly sync status reports
- Dependency drift detection
- Documentation divergence alerts
- Integration health monitoring
Integration Points
Related Skills
github-workflow- GitHub workflow automationgithub-pr- Pull request managementsparc-architect- Architecture designsparc-optimizer- Performance optimization
Related Commands
/github sync-coordinator- Cross-repo synchronization/github release-manager- Coordinated releases/github repo-architect- Repository optimization/sparc architect- Detailed architecture design
Support and Resources
- Documentation: https://github.com/ruvnet/claude-flow
- Issues: https://github.com/ruvnet/claude-flow/issues
- Examples:
.claude/examples/github-multi-repo/
Version: 1.0.0 Last Updated: 2025-10-19 Maintainer: Claude Flow Team
What Users Are Saying
Real feedback from the community
Environment Matrix
Dependencies
Framework Support
Context Window
Security & Privacy
Information
- Author
- ruvnet
- Updated
- 2026-01-30
- Category
- architecture-patterns
Related Skills
Github Multi Repo
Multi-repository coordination, synchronization, and architecture management with AI swarm …
View Details →Swarm Orchestration
Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and …
View Details →Swarm Orchestration
Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and …
View Details →