Token导航 LogoToken导航

Agent Skill · 研究检索

multi-repo-git-ops(多仓库 git 操作)

multi-repo-git-ops 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

multi-repo-git-ops 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 50,332。

总安装 618周安装 26GitHub Stars 8下载 216核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bmad-labs/skills --skill multi-repo-git-ops

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

自动化多仓库 Git 操作流程。支持分支同步与提交聚合管理。提升大规模代码库维护效率。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。需防范误操作导致历史丢失风险。

multi-repo-git-ops 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/multi-repo-git-ops

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bmad-labs/skills --skill multi-repo-git-ops;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

multi-repo-git-ops 怎么安装?

在终端执行 npx skills add https://github.com/bmad-labs/skills --skill multi-repo-git-ops。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

multi-repo-git-ops 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

multi-repo-git-ops 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

multi-repo-git-ops 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

multi-repo-git-ops 用的人多吗?

公开数据是累计安装 618 次,近一周安装 26 次,下载 216 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

multi-repo-git-ops 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
multi-repo-git-ops

多仓库 git 操作 · 本页

6188只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Multi-Repo Git Operations

This skill handles git operations in multi-repo systems that use git submodules. The parent repo orchestrates multiple service repos, each an independent git repository with its own branches, history, and CI/CD.

Understanding this structure is essential — git operations here always involve deciding which repos are affected and operating in each one correctly.

Discovery Protocol

Before performing any git operations, discover the project structure dynamically. Never assume service names, branch mappings, or directory layout — always read from .gitmodules.

Step 1: Identify submodules and their paths

# List all submodules with their paths
git config -f .gitmodules --get-regexp '\.path$'

Step 2: Identify each submodule's tracked branch

# List all submodule branch mappings
git config -f .gitmodules --get-regexp '\.branch$'

# Get a specific service's default branch
git config -f .gitmodules submodule."{submodule-path}".branch

If a submodule has no branch configured in .gitmodules, check the remote:

cd {submodule-path}
git remote show origin | grep 'HEAD branch'

Step 3: Detect project methodology

  • BMAD: Check if _bmad-output/implementation-artifacts/ directory exists
  • If BMAD is detected, the BMAD Integration section applies

Step 4: Cache discovered info for the session

After discovery, the agent knows:

  • All submodule names and paths
  • Each submodule's default branch
  • Whether BMAD is in use
  • The submodule directory prefix (commonly services/)

Use this cached information for all subsequent operations in the session.

Repository Structure

A typical multi-repo project looks like this:

{parent-repo}/                       (parent repo — planning & orchestration only)
├── .gitmodules                      (submodule definitions with tracked branches)
├── services/                        (submodule repos — directory name may vary)
│   ├── auth-service/                (branch: develop)
│   ├── booking-service/             (branch: dev)
│   ├── config-repo/                 (branch: main)
│   └── ...
└── [project methodology dirs]       (e.g., _bmad-output/ if using BMAD)

Key principle: The parent repo tracks commit pointers to each submodule, not the submodule code itself. When you change code in a service, you commit in the service repo, then update the parent's pointer.

Branch Conventions

Default Branches by Service

Services may track different default branches — always look up the correct one before branching:

# Get a service's default branch (always use this — never assume)
git config -f .gitmodules submodule."{submodule-path}".branch

Different services in the same project often use different default branches (e.g., develop, dev, main). The only reliable source of truth is .gitmodules.

Feature Branch Naming

For ticket-based work (JIRA/project tracker):

{type}/{TICKET-ID}-{short-description}

Examples: feat/PROJ-1234-add-search-by-date, bugfix/PROJ-5678-fix-null-pointer

For BMAD story work (derived from story file name):

feat/{story-key}

The story key comes from the story file name. A story file named 1-2-user-authentication.md (representing Epic 1, Story 2) produces branch name feat/1-2-user-authentication.

Branch type prefixes: feat/, fix/, bugfix/, chore/, base/

BMAD Integration (If Applicable)

This section applies only if the project uses the BMAD methodology. Detect this by checking for the _bmad-output/implementation-artifacts/ directory.

BMAD manages work through story files and sprint status tracking. This section explains how git operations map to the BMAD lifecycle.

How Stories Reference Services

BMAD story files live at _bmad-output/implementation-artifacts/{story-key}.md. Stories reference affected services in several ways — check all of these:

  1. Service tags in story title or body: [auth-service], [scheduler-service]
  2. Dev Notes section: Lists "Source tree components to touch" with service paths
  3. Project Structure Notes: References paths like services/{service-name}/src/...
  4. Tasks/Subtasks: Individual tasks may reference different services

When a story doesn't explicitly tag services, look at the file paths mentioned in Dev Notes and Tasks to determine which submodule directories are involved.

BMAD Status and Git Operations Mapping

BMAD tracks story status in _bmad-output/implementation-artifacts/sprint-status.yaml. Each status transition has corresponding git operations:

Story Status ChangeGit Operations Required
backlog → ready-for-devNo git ops (story file creation only)
ready-for-dev → in-progressCreate feature branches in affected services
in-progress (ongoing work)Commit changes in service repos
in-progress → reviewPush all service branches, ensure clean state
review → in-progress (fixes)Continue on same branches, commit fixes
review → donePRs merged, update parent submodule pointers

Starting a BMAD Story (Git Setup)

When beginning work on a BMAD story, perform these git operations:

Step 1: Read the story and identify services

# Story files follow pattern: {epic_num}-{story_num}-{slug}.md
# Example: _bmad-output/implementation-artifacts/1-2-user-authentication.md

Read the story file. Extract affected services from:

  • Service tags like [auth-service]
  • File paths in Dev Notes (e.g., services/{service-name}/src/...)
  • Task descriptions referencing specific services

Step 2: Derive the branch name from the story key

# Story file: 1-2-user-authentication.md → branch: feat/1-2-user-authentication
STORY_KEY="1-2-user-authentication"  # from the story file name (without .md)
BRANCH_NAME="feat/${STORY_KEY}"

Step 3: Create branches in all affected services

# For each affected service (replace with actual discovered service names):
for SERVICE in auth-service scheduler-service; do
  DEFAULT_BRANCH=$(git config -f .gitmodules submodule."services/$SERVICE".branch)
  cd services/$SERVICE
  git checkout $DEFAULT_BRANCH
  git pull origin $DEFAULT_BRANCH
  git checkout -b $BRANCH_NAME
  git push -u origin $BRANCH_NAME
  cd ../..
done

Use the same branch name across all affected services for traceability. This makes it easy to find all changes related to a story across the system.

Step 4: Verify setup

# Confirm all affected services are on the correct branch
git submodule foreach --quiet 'BRANCH=$(git branch --show-current); echo "$(basename $(pwd)): $BRANCH"'

During Story Implementation

Committing changes — always commit inside the service directory:

cd services/{service-name}
git add {specific-files}
git commit -m "feat({scope}): add validation for booking dates

Story: {story-key}"

Working across multiple services — commit in each separately:

# Service A
cd services/auth-service
git add src/auth/jwt.service.ts src/auth/jwt.service.spec.ts
git commit -m "feat(auth): add JWT validation endpoint

Story: 1-2-user-authentication"

# Service B
cd ../bff-service
git add src/middleware/auth.middleware.ts
git commit -m "feat(middleware): add JWT auth middleware

Story: 1-2-user-authentication"

All commits must follow the Commit Message Format section below — this is critical for release-please to generate correct changelogs and version bumps.

Completing a Story (Push & PR)

When story is ready for review:

Step 1: Run quality checks in each affected service

cd services/{service-name}
npm run lint
npm run format
npm run typecheck
npm test

Step 2: Push each service's feature branch

# Push services first — always before parent
cd services/{service-name}
git push origin feat/{story-key}

Step 3: Create PR per service Each service gets its own PR: feat/{story-key} → service's default branch.

PR title format: feat({story-key}): {story title} PR body should reference the story: Story: {epic_num}.{story_num} - {title}

Step 4: After PRs are merged, update parent

# For each merged service:
cd services/{service-name}
git checkout {default-branch}
git pull origin {default-branch}
cd ../..

# Update parent pointers (use actual discovered service paths)
git add services/auth-service services/bff-service
git commit -m "chore: update submodule pointers after story {story-key}

Services updated:
- auth-service
- bff-service"

Commit Message Format (Release-Please Compatible)

If the project uses release-please for automated versioning and changelog generation, every commit message must follow the Conventional Commits specification so release-please can correctly determine version bumps and produce meaningful changelogs.

Even without release-please, Conventional Commits is the recommended format for multi-repo systems because it produces clean, parseable git history across many repositories.

No AI Co-Author Trailers

NEVER add Co-Authored-By trailers for AI agents in commit messages. This means no lines like:

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Commit messages must only contain the conventional commit structure described below. AI attribution in commits pollutes changelogs, adds noise to git history, and provides no value. This rule applies to all commits — feature, fix, chore, or otherwise.

Structure

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Header rules:

  • type — required (see type table below)
  • scope — optional, a noun describing the affected code section in parentheses
  • description — required, immediately after :

- Use imperative, present tense: "add" not "added" or "adds" - Do not capitalize the first letter - Do not end with a period - Keep under ~100 characters

Body — optional, separated from header by a blank line. Free-form, explains the "what" and "why".

Footer(s) — optional, separated from body by a blank line. Used for breaking changes, story references, and other metadata.

Commit Types and Version Bumps

Release-please only creates a release when it detects releasable units — commits with types that map to a version bump. Choosing the right type matters because it directly controls what version gets released and what appears in the changelog.

Releasable types (trigger a release)
TypeSemVer BumpWhen to use
featMinor (0.x.0)New capability, endpoint, feature, UI component
fixPatch (0.0.x)Bug fix for existing functionality
depsPatch (0.0.x)Dependency updates (package.json, lock files)
Non-releasable types (won't trigger a release alone)
TypeWhen to use
refactorCode restructuring without behavior change
perfPerformance improvement (special refactoring)
testAdding or correcting tests
docsDocumentation changes only
styleCode style (formatting, whitespace, semicolons)
choreMaintenance tasks (.gitignore, configs, tooling)
buildBuild system, dependencies, project version
ciCI/CD pipeline and workflow changes

If you only commit non-releasable types since the last release, no release PR will be created. Be intentional — don't use chore: when the change is actually a feat: or fix:.

Choosing the right type
New capability or feature?           → feat
Fixing a bug?                        → fix
Dependency update?                   → deps
Performance improvement?             → perf
Code restructuring, no behavior Δ?   → refactor
Documentation only?                  → docs
Tests only?                          → test
CI/CD or build changes?              → ci / build
Everything else (configs, tooling)?  → chore

Breaking Changes (Major Bump)

Any commit type with a breaking change triggers a major version bump. Two formats:

Option A — ! in the header:

feat(api)!: redesign authentication flow

BREAKING CHANGE: the /auth/login endpoint now requires OAuth2 tokens
instead of API keys. All existing integrations must migrate.

Option B — footer only:

refactor(database): migrate from MongoDB to PostgreSQL

BREAKING CHANGE: all database connection strings must be updated.
The MongoDB driver is no longer included.

Both BREAKING CHANGE (space) and BREAKING-CHANGE (hyphen) are recognized in footers.

When marking a breaking change, always include a BREAKING CHANGE: footer explaining the migration impact — even when using the ! format. The footer is what consumers read to understand what they need to change.

Scopes

Scopes describe which code section is affected — they help organize changelogs and, in monorepo setups, route changes to the correct package.

Good scopes (describe code areas):

feat(auth): add JWT validation
fix(scheduler): correct cron expression parsing
refactor(booking): extract date utility

Bad scopes (these are anti-patterns):

fix(PROJ-1234): ...          ← ticket IDs are not scopes
feat(john): ...               ← people are not scopes

Use the domain or module name as the scope (e.g., auth, booking, scheduler, middleware, config, migration).

Story References

If using BMAD, include the story key in the commit body or footer, not in the scope:

feat(auth): add JWT validation endpoint

Implement token validation with RS256 signing.

Story: 1-2-user-authentication

Special Release-Please Footers

FooterPurpose
BREAKING CHANGE: <desc>Triggers major version bump
Release-As: x.x.xForce a specific version number

Release-As example — useful for initial releases or coordinated version jumps:

chore: prepare v3.0.0 release

Release-As: 3.0.0

Complete Examples

Simple feature (minor bump):

feat(booking): add search by date range endpoint

Bug fix with context (patch bump):

fix(auth): resolve token refresh race condition

The refresh token was being invalidated before the new access token
was issued, causing a brief window where requests would fail.

Story: 2-3-auth-improvements

Breaking change (major bump):

feat(api)!: remove deprecated v1 booking endpoints

BREAKING CHANGE: all /api/v1/bookings/* endpoints are removed.
Consumers must migrate to /api/v2/bookings/* which uses the new
pagination format.

Story: 3-1-api-v2-migration

Dependency update (patch bump):

deps: upgrade @nestjs/core to v11.0.0

Test-only change (no release):

test(scheduler): add unit tests for cron expression parser

Chore (no release):

chore: update .gitignore to exclude coverage reports

Parent Repo Commit Messages

When updating submodule pointers in the parent repo, use chore: since these don't represent feature changes in the parent itself:

chore: update submodule pointers after story 1-2-user-authentication

Services updated:
- auth-service
- bff-service

General Operations Reference

Create Feature Branch (Non-BMAD)

For ad-hoc work not tied to a BMAD story:

DEFAULT_BRANCH=$(git config -f .gitmodules submodule."{submodule-path}".branch)
cd {submodule-path}
git checkout $DEFAULT_BRANCH
git pull origin $DEFAULT_BRANCH
git checkout -b feat/{TICKET-ID}-{description}
git push -u origin feat/{TICKET-ID}-{description}

Sync All Submodules

# Pull parent and update all submodule pointers
git pull origin main
git submodule update --recursive

# OR: Pull latest from each submodule's tracked branch
git submodule foreach 'git pull origin $(git config -f $toplevel/.gitmodules submodule.$name.branch)'

Check Status Across All Repos

# Quick status: show only services with changes or non-default branches
git submodule foreach --quiet \
  'STATUS=$(git status --porcelain); BRANCH=$(git branch --show-current); DEFAULT=$(git config -f $toplevel/.gitmodules submodule.$name.branch); if [ -n "$STATUS" ] || [ "$BRANCH" != "$DEFAULT" ]; then echo "$(basename $(pwd)) [$BRANCH]: $([ -n "$STATUS" ] && echo "has changes" || echo "clean, non-default branch")"; fi'

Switch Service Back to Default Branch

DEFAULT_BRANCH=$(git config -f .gitmodules submodule."{submodule-path}".branch)
cd {submodule-path}
git checkout $DEFAULT_BRANCH
git pull origin $DEFAULT_BRANCH

CI/CD Awareness

Understanding what happens when you push is critical in multi-repo systems. Typical branch-to-deployment mappings:

BranchTypical Push Effect
develop / devMay auto-deploy to dev environment — confirm with user first
mainStable reference — deployment workflows available
test, stage, releaseManual deployment via workflow_dispatch
feat/*, base/*CI runs (lint, test, build) but no deployment

Actual deployment behavior depends on the project's CI/CD configuration. Check if the project has a shared CI/CD workflow repository among its submodules, and confirm with the user which branches trigger deployments.

Safety Rules

These rules prevent common mistakes in multi-repo systems:

  1. Always push service repos before parent — pushing parent first creates broken submodule pointers that break other developers' checkouts
  2. Never force-push to shared default branches (develop, dev, main) — these are shared branches
  3. Confirm with user before pushing to deployment-triggering branches
  4. Check service's default branch before creating feature branches — they differ across services, and branching from the wrong base causes merge conflicts
  5. Never use git add. or git add -A in service repos — always add specific files to avoid committing secrets or build artifacts
  6. Never commit .env, credentials, secrets, or node_modules in any repo
  7. Same branch name across services for multi-service stories — enables traceability
  8. Update sprint-status.yaml when git operations change story state (branch created → in-progress, pushed for review → review) — only if using BMAD
  9. Never add Co-Authored-By trailers for AI agents in commit messages — no Claude, Copilot, or any AI attribution. These pollute changelogs and git history. Commit messages must contain only the conventional commit structure (type, scope, description, body, footers for breaking changes/story refs)
  10. All commit messages must be Conventional Commits format — release-please depends on this for automated versioning and changelog generation. A malformed commit message can cause missed releases or incorrect version bumps

平台分布

Codex

35.84%
按下载量换算77

Claude

32.17%
按下载量换算69

Cursor

19%
按下载量换算41

Gemini CLI

8.96%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills