multi-repo-git-ops

multi-repo-git-ops is a skill for Claude Code from bmad-labs/skills. It costs 139 tokens per session (4,642 once invoked), scanned A, original, MIT.

A guide for managing Git across a main repository and its linked sub-repositories, called submodules. Each sub-repository has its own branches, history, and build checks.

In plain words
What is it for?
Use it to create branches, commit and push changes, synchronize submodules, or coordinate work across several related repositories.
Why use it?
It prevents changes from being committed or pushed in the wrong repository. It first checks the repository layout and branch settings instead of assuming how the project is organized.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd ../...

Part of the bmad-skills plugin — 24 skills shipped together

Good fit Use it to create branches, commit and push changes, synchronize submodules, or coordinate work across several related repositories.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/bmad-labs/skills
agentmods
npx agentmods add skills/bmad-labs/skills/multi-repo-git-ops

Made for: Claude Code.

Or install bmad-skills, the plugin that ships this one along with the rest of its 24 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for multi-repo-git-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/bmad-labs/skills/multi-repo-git-ops/github.svg)](https://agentmods.dev/skills/bmad-labs/skills/multi-repo-git-ops)
Your own site
<a href="https://agentmods.dev/skills/bmad-labs/skills/multi-repo-git-ops"><img src="https://agentmods.dev/badge/skills/bmad-labs/skills/multi-repo-git-ops/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for multi-repo-git-ops

Your own site · 80×15
<a href="https://agentmods.dev/skills/bmad-labs/skills/multi-repo-git-ops"><img src="https://agentmods.dev/badge/skills/bmad-labs/skills/multi-repo-git-ops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 406
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 499
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00139 $0.04642
Opus 5 $0.00069 $0.02321
Sonnet 5 $0.00028 $0.00928
Haiku 4.5 $0.00014 $0.00464

Measured 10d ago against content hash 9cdac1dde560, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

multi-repo-git-ops scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/multi-repo-git-ops/SKILL.md · 520 lines

How it starts

The opening of the file, as written. The whole thing — 520 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

Read the full file on GitHub · 520 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 520 lines · 139 tokens per session scan A 9cdac1dde560

Subscribe to this mod's changes

multi-repo-git-ops is a skill published in the GitHub repository bmad-labs/skills (15 stars, last pushed 13d ago), licensed MIT. It adds 139 tokens to every session and 4,642 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.