multi-repository-orchestrator

from jackspace/claudeskillz

ClaudeSkillz: For when you need skills, but lazier

8 stars2 forksUpdated Nov 20, 2025
npx skills add https://github.com/jackspace/claudeskillz --skill multi-repository-orchestrator

SKILL.md

Multi-Repository Orchestrator

Manage development workflows seamlessly across multiple Git repositories.

Overview

Many modern projects span multiple repositories:

  • Microservices architectures
  • Frontend + Backend + Shared libraries
  • Multi-package monorepos split across repos
  • Infrastructure + Application code
  • Documentation + Code repositories

This skill provides tools and patterns to orchestrate changes, commits, and workflows across multiple repositories as if they were one.

When to Use

Use this skill when:

  • Working with microservices split across repos
  • Maintaining frontend/backend in separate repositories
  • Managing shared libraries used by multiple repos
  • Coordinating infrastructure and application code
  • Synchronizing changes across dependent projects
  • Running tests across multiple repositories
  • Deploying multi-repo applications
  • Maintaining consistency across project family

Repository Discovery

Auto-Discovery Pattern

#!/bin/bash
# discover-repos.sh - Find all related repositories

BASE_DIR="${1:-.}"
WORKSPACE_FILE=".workspace"

# Find all git repositories
find "$BASE_DIR" -name ".git" -type d | while read git_dir; do
    REPO_DIR=$(dirname "$git_dir")
    REPO_NAME=$(basename "$REPO_DIR")

    # Get remote URL
    cd "$REPO_DIR"
    REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "none")

    echo "$REPO_NAME|$REPO_DIR|$REMOTE_URL"
done | tee "$WORKSPACE_FILE"

echo ""
echo "Discovered $(wc -l < $WORKSPACE_FILE) repositories"
echo "Workspace file: $WORKSPACE_FILE"

Manual Workspace Configuration

# workspace.yaml - Define multi-repo workspace

workspace:
  name: my-microservices
  base_dir: ~/projects

repositories:
  - name: api-gateway
    path: ./api-gateway
    url: https://github.com/org/api-gateway
    category: backend

  - name: user-service
    path: ./user-service
    url: https://github.com/org/user-service
    category: backend

  - name: frontend
    path: ./frontend
    url: https://github.com/org/frontend
    category: frontend

  - name: shared-lib
    path: ./shared-lib
    url: https://github.com/org/shared-lib
    category: library

  - name: infrastructure
    path: ./infrastructure
    url: https://github.com/org/infrastructure
    category: infra

Synchronized Branching

Create Branches Across Repos

#!/bin/bash
# sync-branch-create.sh - Create same branch in multiple repos

BRANCH_NAME="$1"
REPOS_FILE="${2:-.workspace}"

if [ -z "$BRANCH_NAME" ]; then
    echo "Usage: $0 <branch-name> [repos-file]"
    exit 1
fi

echo "=== Creating branch: $BRANCH_NAME ==="
echo ""

while IFS='|' read -r name path url; do
    echo "Repository: $name"
    cd "$path" || continue

    # Get current branch
    CURRENT=$(git branch --show-current)

    # Create and checkout new branch
    if git checkout -b "$BRANCH_NAME" 2>/dev/null; then
        echo "  ✓ Created and checked out $BRANCH_NAME"
    else
        # Branch might already exist
        if git checkout "$BRANCH_NAME" 2>/dev/null; then
            echo "  ✓ Checked out existing $BRANCH_NAME"
        else
            echo "  ✗ Failed to create/checkout $BRANCH_NAME"
        fi
    fi

    cd - > /dev/null
    echo ""
done < "$REPOS_FILE"

echo "✓ Branch creation complete"

Claude-Compatible Multi-Repo Branching

#!/bin/bash
# claude-multi-branch.sh - Create Claude-formatted branches across repos

FEATURE="$1"
SESSION_ID="${2:-$(date +%s)}"
REPOS_FILE="${3:-.workspace}"

if [ -z "$FEATURE" ]; then
    echo "Usage: $0 <feature-name> [session-id] [repos-file]"
    exit 1
fi

while IFS='|' read -r name path url; do
    echo "=== $name ==="
    cd "$path" || continue

    # Claude branch format
    BRANCH="claude/${FEATURE}-${name}-${SESSION_ID}"

    git checkout main 2>/dev/null || git checkout master 2>/dev/null
    git pull

    if git checkout -b "$BRANCH"; then
        echo "✓ Created: $BRANCH"
    fi

    cd - > /dev/null
done < "$REPOS_FILE"

Batch Operations

Batch Status Check

#!/bin/bash
# multi-status.sh - Check status across all repos

REPOS_FILE="${1:-.workspace}"

echo "=== Repository Status ==="
echo ""

while IFS='|' read -r name path url; do
    cd "$path" || continue

    BRANCH=$(git branch --show-current)
    STATUS=$(git status --porcelain)
    UNPUSHED=$(git log origin/$BRANCH..$BRANCH --oneline 2>/dev/null | wc -l)

    echo "📁 $name"
    echo "   Branch: $BRANCH"

    if [ -z "$STATUS" ]; then
        echo "   Status: ✓ Clean"
    else
        CHANGES=$(echo "$STATUS" | wc -l)
        echo "   Status: ⚠️  $CHANGES file(s) changed"
    fi

    if [ "$UNPUSHED" -gt 0 ]; then
        echo "   Commits: ⚠️  $UNPUSHED unpushed"
    else
        echo "   Commits: ✓ Synced"
    fi

    echo ""
    cd - > /dev/null
done < "$REPOS_FILE"

Batch Commit

#!/bin/bash
# multi-commit.sh - Commit changes across all repos

COMMIT_MSG="$1"
REPOS_FILE="${2:-.workspace}"

if [ -z "$COMMIT_MSG" ]; then
  

...
Read full content

Repository Stats

Stars8
Forks2
LicenseMIT License