git-sync-submodule-deterministic

Synchronize a local git submodule with its hub via a deterministic script.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/WesleyMFrederick/cc-workflows-plugin --skill git-sync-submodule-deterministic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-sync-submodule-deterministic
Source: https://github.com/WesleyMFrederick/cc-workflows-plugin/tree/main/src-claude/skills/git-sync-submodule-deterministic
Command: npx skills add https://github.com/WesleyMFrederick/cc-workflows-plugin --skill git-sync-submodule-deterministic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the deterministic synchronization of a local submodule with its hub, ensuring alignment of pointers while keeping the LLM's input strictly output-centric and providing clear status signals for orchestration.

Core Features & Use Cases

  • Deterministic submodule alignment: compares local and hub heads, classifies reachability (synced, catch-up, diverged, submodule-ahead) and handles pointer updates.
  • Safe conflict handling: when divergence with overlapping changes is detected, it reports actionable options to recover without blindly overwriting changes.
  • Integration-friendly outputs: emits KEY=VALUE status lines (STATUS, NEW_HEAD, OVERLAP_FILES, DIFF_SUMMARY) for downstream automation and AI orchestration.

Quick Start

Run the git-sync-submodule-deterministic script to synchronize the local submodule with the hub and observe the phase-driven status output.

Frequently Asked Questions about git-sync-submodule-deterministic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate git submodule sync deterministically?

Automating git submodule sync deterministically requires a script that compares local and hub heads, classifies reachability, and emits KEY=VALUE status markers. This approach ensures strict pointer alignment while providing clear signals for downstream orchestration without blind overwrites.

What happens when a git submodule diverged with overlapping changes?

When a git submodule diverged with overlapping changes, the deterministic script detects the conflict and reports actionable recovery options via OVERLAP_FILES. It avoids blindly overwriting local modifications by enforcing safe conflict handling and strict exit codes.

How do I handle git submodule status reporting for LLM orchestration?

Handling git submodule status reporting for LLM orchestration involves emitting strict KEY=VALUE pairs like STATUS, NEW_HEAD, and DIFF_SUMMARY. This output-centric format allows language models to parse synchronization results and validate downstream automation phases.

Can I catch up a local submodule that is behind its hub repository?

You can catch up a local submodule that is behind its hub repository by running the deterministic sync script. It classifies the state as catch-up, safely updates the local pointer to the new head, and reports the alignment status.

Does git submodule sync work when local commits are ahead of the hub?

Git submodule sync works when local commits are ahead of the hub by classifying the state as submodule-ahead. The deterministic script reports this status, allowing you to decide whether to push local changes or safely reset the pointer.

What is the best way to integrate git submodule maintenance into automated workflows?

The best way to integrate git submodule maintenance into automated workflows is using a deterministic script that outputs phase-driven status markers and enforces strict exit codes. This enables reliable validation and seamless LLM-driven orchestration across repositories.