Skip to main content
AI/MLjmagly

git-mirror-audit

Verify configured secondary git mirrors are present and not drifting from the primary remote/default branch

Stars
141
Source
jmagly/aiwg
Updated
2026-05-31
Slug
jmagly--aiwg--git-mirror-audit
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/jmagly/aiwg/HEAD/agentic/code/addons/aiwg-utils/skills/git-mirror-audit/SKILL.md -o .claude/skills/git-mirror-audit.md

Drops the SKILL.md into .claude/skills/git-mirror-audit.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Git Mirror Audit

Audit redundant git mirrors declared in .aiwg/aiwg.config:

{
  "remotes": {
    "primary": "origin",
    "secondary": [
      {
        "name": "github",
        "purpose": "backup-mirror",
        "push_on_release": true
      }
    ]
  }
}

Execution Flow

  1. Read remotes.primary, delivery.default_branch, and remotes.secondary[].
  2. Confirm every configured secondary exists in git remote.
  3. Fetch remote refs in read-only mode when the operator permits network access.
  4. Compare refs/remotes/{primary}/{default_branch} with each secondary's default branch ref.
  5. Report drift, missing remotes, and last known commit for each mirror.

Semantics

  • purpose: backup-mirror means the mirror is a disaster-recovery copy and should receive release pushes.
  • push_on_release: true means release procedures must push tags and release commits to that mirror before declaring release complete.
  • This skill audits state; it never performs the push.

References

  • agentic/code/addons/aiwg-utils/rules/delivery-policy.md
  • .aiwg/security/curl-checklist-gap-analysis.md row 3, Practice 21