Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

multi-repository-orchestrator多存储库协调器

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

984

周安装

41

GitHub Stars

14

下载量

328
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:multi-repository-orchestrator(多存储库协调器)
来源仓库:https://github.com/jackspace/claudeskillz
仓库路径:skills/multi-repository-orchestrator
安装命令:
npx skills add https://github.com/jackspace/claudeskillz --skill multi-repository-orchestrator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jackspace/claudeskillz --skill multi-repository-orchestrator

简介

协调多个存储库之间的协作流程。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 支持 Issue、PR 与分支联动管理。
  • 便于大型项目进度跟踪与资源调配。
  • 写入操作前应验证用户授权级别。
  • multi-repository-orchestrator 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

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
    echo "Usage: $0 <commit-message> [repos-file]"
    exit 1
fi

echo "=== Committing to all repositories ==="
echo "Message: $COMMIT_MSG"
echo ""

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

    # Check if there are changes
    if [ -n "$(git status --porcelain)" ]; then
        echo "📁 $name"

        # Show what will be committed
        git status --short

        # Commit
        git add .
        if git commit -m "$COMMIT_MSG"; then
            echo "  ✓ Committed"
        else
            echo "  ✗ Commit failed"
        fi
        echo ""
    else
        echo "📁 $name - No changes"
    fi

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

echo "✓ Batch commit complete"

Batch Push with Retry

#!/bin/bash
# multi-push.sh - Push all repos with retry logic

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

push_with_retry() {
    local repo_name="$1"
    local branch="$2"

    for attempt in $(seq 1 $MAX_RETRIES); do
        if git push -u origin "$branch" 2>&1; then
            echo "  ✓ Pushed successfully"
            return 0
        else
            if [ $attempt -lt $MAX_RETRIES ]; then
                DELAY=$((2 ** attempt))
                echo "  ⚠️  Push failed (attempt $attempt/$MAX_RETRIES), retrying in ${DELAY}s..."
                sleep $DELAY
            fi
        fi
    done

    echo "  ✗ Push failed after $MAX_RETRIES attempts"
    return 1
}

echo "=== Pushing all repositories ==="
echo ""

FAILED_REPOS=()

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

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

    if [ "$UNPUSHED" -gt 0 ]; then
        echo "📁 $name ($UNPUSHED commits)"
        if ! push_with_retry "$name" "$BRANCH"; then
            FAILED_REPOS+=("$name")
        fi
        echo ""
    else
        echo "📁 $name - Nothing to push"
    fi

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

if [ ${#FAILED_REPOS[@]} -gt 0 ]; then
    echo "⚠️  Failed repositories:"
    printf '  - %s\n' "${FAILED_REPOS[@]}"
    exit 1
else
    echo "✓ All repositories pushed successfully"
fi

Cross-Repository Operations

Find File Across Repos

#!/bin/bash
# find-file.sh - Search for file across all repositories

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

if [ -z "$PATTERN" ]; then
    echo "Usage: $0 <filename-pattern> [repos-file]"
    exit 1
fi

echo "=== Searching for: $PATTERN ==="
echo ""

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

    MATCHES=$(find . -name "$PATTERN" ! -path "*/node_modules/*" ! -path "*/.git/*")

    if [ -n "$MATCHES" ]; then
        echo "📁 $name"
        echo "$MATCHES" | sed 's/^/   /'
        echo ""
    fi

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

Grep Across Repos

#!/bin/bash
# multi-grep.sh - Search for pattern in all repos

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

if [ -z "$PATTERN" ]; then
    echo "Usage: $0 <search-pattern> [repos-file]"
    exit 1
fi

echo "=== Searching for pattern: $PATTERN ==="
echo ""

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

    if git grep -n "$PATTERN" 2>/dev/null; then
        echo ""
        echo "--- Found in: $name ---"
        git grep -n --heading --break "$PATTERN"
        echo ""
    fi

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

Dependency Analysis

#!/bin/bash
# analyze-dependencies.sh - Find dependencies between repos

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

echo "=== Cross-Repository Dependencies ==="
echo ""

# Build list of package names
declare -A PACKAGES
while IFS='|' read -r name path url; do
    cd "$path" || continue

    # Check for package.json
    if [ -f "package.json" ]; then
        PKG_NAME=$(jq -r '.name' package.json 2>/dev/null)
        PACKAGES["$PKG_NAME"]="$name"
    fi

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

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

    if [ -f "package.json" ]; then
        echo "📁 $name"

        # Check dependencies
        for pkg_name in "${!PACKAGES[@]}"; do
            if jq -e ".dependencies[\"$pkg_name\"] // .devDependencies[\"$pkg_name\"]" package.json > /dev/null 2>&1; then
                VERSION=$(jq -r ".dependencies[\"$pkg_name\"] // .devDependencies[\"$pkg_name\"]" package.json)
                echo "   → depends on ${PACKAGES[$pkg_name]} ($pkg_name@$VERSION)"
            fi
        done
        echo ""
    fi

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

Testing & Building

Run Tests Across Repos

#!/bin/bash
# multi-test.sh - Run tests in all repositories

REPOS_FILE="${1:-.workspace}"
TEST_CMD="${2:-npm test}"

echo "=== Running Tests Across Repositories ==="
echo "Command: $TEST_CMD"
echo ""

FAILED_REPOS=()

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

    if eval "$TEST_CMD" 2>&1 | tee "/tmp/$name-test.log"; then
        echo "  ✓ Tests passed"
    else
        echo "  ✗ Tests failed"
        FAILED_REPOS+=("$name")
    fi

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

# Summary
echo "=== Test Summary ==="
if [ ${#FAILED_REPOS[@]} -eq 0 ]; then
    echo "✓ All tests passed!"
else
    echo "✗ Tests failed in:"
    printf '  - %s\n' "${FAILED_REPOS[@]}"
    exit 1
fi

Parallel Build

#!/bin/bash
# multi-build.sh - Build all repos in parallel

REPOS_FILE="${1:-.workspace}"
BUILD_CMD="${2:-npm run build}"
MAX_PARALLEL=3

echo "=== Building Repositories ==="
echo "Command: $BUILD_CMD"
echo "Max parallel: $MAX_PARALLEL"
echo ""

ACTIVE_JOBS=0
declare -A JOB_PIDS

while IFS='|' read -r name path url; do
    # Wait if at max parallel
    while [ $ACTIVE_JOBS -ge $MAX_PARALLEL ]; do
        wait -n
        ACTIVE_JOBS=$((ACTIVE_JOBS - 1))
    done

    # Start build in background
    (
        echo "📁 Building: $name"
        cd "$path" || exit 1

        if eval "$BUILD_CMD" > "/tmp/$name-build.log" 2>&1; then
            echo "  ✓ $name built successfully"
        else
            echo "  ✗ $name build failed"
            echo "  Log: /tmp/$name-build.log"
        fi
    ) &

    JOB_PIDS["$name"]=$!
    ACTIVE_JOBS=$((ACTIVE_JOBS + 1))
done < "$REPOS_FILE"

# Wait for all builds
wait

echo ""
echo "✓ All builds complete"

Advanced Workflows

Coordinated Feature Development

#!/bin/bash
# feature-workflow.sh - Coordinate feature across repos

FEATURE="$1"
REPOS="$2"  # Comma-separated list or "all"

# 1. Create feature branches
echo "=== Step 1: Creating feature branches ==="
./claude-multi-branch.sh "$FEATURE"

# 2. Make changes (interactive or scripted)
echo ""
echo "=== Step 2: Make your changes ==="
echo "Make changes in the repositories, then run this script again"
read -p "Changes complete? (y/n) " -n 1 -r
echo

[[ ! $REPLY =~ ^[Yy]$ ]] && exit 0

# 3. Run tests
echo ""
echo "=== Step 3: Running tests ==="
./multi-test.sh

# 4. Commit changes
echo ""
echo "=== Step 4: Committing changes ==="
read -p "Commit message: " commit_msg
./multi-commit.sh "$commit_msg"

# 5. Push to remote
echo ""
echo "=== Step 5: Pushing to remote ==="
./multi-push.sh

# 6. Create PRs
echo ""
echo "=== Step 6: Creating pull requests ==="
./multi-pr.sh "$FEATURE"

echo ""
echo "✓ Feature workflow complete!"

Multi-Repo PR Creation

#!/bin/bash
# multi-pr.sh - Create PRs for all repos

FEATURE="$1"
BASE_BRANCH="${2:-main}"
REPOS_FILE="${3:-.workspace}"

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

    BRANCH=$(git branch --show-current)

    # Skip if on base branch
    if [ "$BRANCH" = "$BASE_BRANCH" ]; then
        echo "📁 $name - On base branch, skipping"
        continue
    fi

    # Check if there are changes
    if [ -z "$(git log origin/$BASE_BRANCH..$BRANCH --oneline)" ]; then
        echo "📁 $name - No changes, skipping"
        continue
    fi

    echo "📁 Creating PR for: $name"

    # Create PR
    gh pr create \
        --base "$BASE_BRANCH" \
        --head "$BRANCH" \
        --title "feat($name): $FEATURE" \
        --body "Part of $FEATURE feature implementation in $name repository." \
        2>&1 | grep -E "(Creating pull request|https://)"

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

Best Practices

✅ DO

  1. Use workspace files to define repository collections
  2. Batch operations for efficiency
  3. Check status before batch commits
  4. Test before pushing across all repos
  5. Use retry logic for network operations
  6. Maintain consistency in branch naming
  7. Track dependencies between repositories
  8. Document relationships in workspace config

❌ DON'T

  1. Don't assume all repos need same changes
  2. Don't skip individual repo status checks
  3. Don't force push without careful consideration
  4. Don't ignore test failures in any repo
  5. Don't commit unrelated changes together
  6. Don't break cross-repo dependencies
  7. Don't forget to update shared libraries first
  8. Don't over-parallelize (3-5 concurrent max)

Quick Reference

# Discover repositories
./discover-repos.sh ~/projects

# Create branches across all repos
./sync-branch-create.sh feature-name

# Check status
./multi-status.sh

# Batch commit
./multi-commit.sh "feat: Add new feature"

# Batch push with retry
./multi-push.sh

# Run tests
./multi-test.sh

# Create PRs
./multi-pr.sh feature-name

# Search across repos
./multi-grep.sh "searchPattern"

Version: 1.0.0 Author: Harvested from multi-repository management patterns Last Updated: 2025-11-18 License: MIT Key Principle: Coordinate across repositories without losing sight of individual repo needs.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.43%
按下载量换算97

OpenCode

22.68%
按下载量换算74

Gemini CLI

15.87%
按下载量换算52

windsurf

12.92%
按下载量换算42

Antigravity

7.98%
按下载量换算26

github-copilot

3.52%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills