Git Submodule Use this skill as the repository's Git submodule choice and operator-workflow anchor . The job is not to dump every command in one blob. The job is to: 1. decide whether submodule is the right boundary at all, 2. choose one operating mode, 3. keep pinned-commit, detached- , and hosted-platform consequences explicit, 4. emit the next safe commands only for that mode. Read references/decision-matrix.md first. Read references/update-and-detached-head.md when the request involves pointer updates, detached , or editing inside the submodule. Read references/ci-and-automation.md for CI…

\n```\n\n## Boundary reminders\n- Generic branch/history cleanup belongs to `git-workflow`.\n- Package delivery belongs to `npm-git-install` or the relevant package-manager skill.\n- Wider bootstrap/task-runner automation belongs to `workflow-automation`.\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":3828,"content_sha256":"9477464e227ccac1c87b05e760fc5bdef99d1ea997e56943403b935f43801f48"},{"filename":"references/update-and-detached-head.md","content":"# Update Flow and Detached-HEAD Notes\n\n## Core truth\nA superproject records a submodule by **commit**, not by “latest branch”. That is why normal `git submodule update` checks out the recorded commit and can leave the submodule in **detached `HEAD`** state.\n\n## Bootstrap patterns\n```bash\n# Fresh clone with all submodules\ngit clone --recurse-submodules \u003crepo-url>\n\n# Existing clone missing submodules\ngit submodule update --init --recursive\n```\n\n## Daily sync modes\n### 1. Match the superproject's recorded commit\nUse when the goal is reproducibility, onboarding, or CI parity.\n```bash\ngit submodule update --init --recursive\n```\n\n### 2. Advance to the tracked remote branch\nUse only when you intentionally want to move the pointer.\n```bash\ngit submodule set-branch --branch main path/to/submodule\ngit submodule update --remote path/to/submodule\n```\nThen review and commit the new pointer from the superproject:\n```bash\ngit add .gitmodules path/to/submodule\ngit commit -m \"chore: update submodule pointer\"\n```\n\n## Detached-HEAD operator rule\nIf you need to make or keep commits **inside** the submodule, do not stay detached.\n```bash\ncd path/to/submodule\ngit switch main # or another real branch\n# make/commit/push submodule changes\ncd -\ngit add path/to/submodule\ngit commit -m \"chore: update submodule pointer\"\n```\n\n## Review commands\n```bash\ngit submodule status --recursive\ngit diff --submodule\ngit submodule summary\n```\n\n## Watch-outs\n- `git submodule update --remote` is not a harmless refresh; it changes the pointer you are pinning.\n- If `.gitmodules` does not set the branch explicitly, collaborators may assume the wrong upgrade target.\n- A submodule commit is not part of the superproject until you stage and commit the submodule path there.\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1759,"content_sha256":"649c16f63984a415e737a49d85a3fc850837812064b8e2ea6d055491689c24ca"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Git Submodule","type":"text"}]},{"type":"paragraph","content":[{"text":"Use this skill as the repository's ","type":"text"},{"text":"Git submodule choice and operator-workflow anchor","type":"text","marks":[{"type":"strong"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"The job is not to dump every ","type":"text"},{"text":"git submodule","type":"text","marks":[{"type":"code_inline"}]},{"text":" command in one blob. The job is to:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"decide whether submodule is the right boundary at all,","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"choose one operating mode,","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"keep pinned-commit, detached-","type":"text"},{"text":"HEAD","type":"text","marks":[{"type":"code_inline"}]},{"text":", and hosted-platform consequences explicit,","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"emit the next safe commands only for that mode.","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Read ","type":"text"},{"text":"references/decision-matrix.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/decision-matrix.md","title":null}}]},{"text":" first. Read ","type":"text"},{"text":"references/update-and-detached-head.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/update-and-detached-head.md","title":null}}]},{"text":" when the request involves pointer updates, detached ","type":"text"},{"text":"HEAD","type":"text","marks":[{"type":"code_inline"}]},{"text":", or editing inside the submodule. Read ","type":"text"},{"text":"references/ci-and-automation.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/ci-and-automation.md","title":null}}]},{"text":" for CI/bootstrap expectations. Read ","type":"text"},{"text":"references/mode-packets-and-hosted-constraints.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/mode-packets-and-hosted-constraints.md","title":null}}]},{"text":" for mode-specific command packets and GitHub Pages / URL-drift constraints.","type":"text"}]},{"type":"paragraph","content":[{"text":"If the user mainly needs:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"local branch/history cleanup, rebase, conflict recovery, or push safety","type":"text","marks":[{"type":"strong"}]},{"text":" → use ","type":"text"},{"text":"git-workflow","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Node package delivery from Git refs, tarballs, workspaces, or publish-first flows","type":"text","marks":[{"type":"strong"}]},{"text":" → use ","type":"text"},{"text":"npm-git-install","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"repo bootstrap/task-runner automation beyond submodule mechanics","type":"text","marks":[{"type":"strong"}]},{"text":" → use ","type":"text"},{"text":"workflow-automation","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"broader environment or container setup","type":"text","marks":[{"type":"strong"}]},{"text":" → use ","type":"text"},{"text":"system-environment-setup","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to use this skill","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Add an external repository to a project via ","type":"text"},{"text":"git submodule add","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Clone or initialize a repository that already contains submodules","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Sync a submodule back to the commit recorded by the superproject","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Advance a submodule to a tracked remote branch and commit the new pointer","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Work inside a submodule without getting surprised by detached ","type":"text"},{"text":"HEAD","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Remove a submodule cleanly","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Configure GitHub Actions or other CI to fetch submodules, including private ones","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check hosted-platform constraints such as GitHub Pages public-submodule limits","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Decide whether submodule vs subtree vs vendoring vs package delivery is the better fit","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When not to use this skill","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The main problem is ordinary Git collaboration, rebasing, or history repair","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The dependency should really be a package-manager / registry artifact","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The task is broader repo bootstrap automation rather than submodule mechanics","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The request is hosted repo administration outside submodule checkout / visibility constraints","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"The user wants a giant Git tutorial instead of the next safe move for one submodule situation","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Instructions","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1: Normalize the request","type":"text"}]},{"type":"paragraph","content":[{"text":"Capture the request in this form first:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"submodule_intake:\n current_goal: decide-boundary | add | bootstrap | sync-to-pinned-commit | advance-tracked-branch | edit-inside-submodule | remove | ci-checkout | hosted-constraint | unknown\n repo_role: superproject-consumer | submodule-maintainer | both | unknown\n dependency_shape: external-repo | vendor-copy | subtree-candidate | package-candidate | unknown\n submodule_state: absent | present-uninitialized | present-detached-head | present-on-branch | pointer-needs-update | unknown\n update_intent: none | match-recorded-commit | move-to-new-upstream-commit | develop-and-push-submodule | unknown\n ci_context: none | github-actions | other-ci | github-pages | unknown\n auth_context: public | private-ssh | private-token | unknown\n collaboration_risk: solo | shared | unknown\n confidence: high | medium | low","type":"text"}]},{"type":"paragraph","content":[{"text":"If context is incomplete, make the safest default explicit.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2: Decide whether submodule is the right tool","type":"text"}]},{"type":"paragraph","content":[{"text":"Answer these before giving commands:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Do we need a ","type":"text"},{"text":"separate upstream Git history","type":"text","marks":[{"type":"strong"}]},{"text":" inside this repo?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Is ","type":"text"},{"text":"exact commit pinning","type":"text","marks":[{"type":"strong"}]},{"text":" the real requirement?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Can the team tolerate recursive clone/bootstrap and CI checkout setup?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Is the dependency more like a subtree, a vendored snapshot, or a published package instead?","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"If the answer is \"not really\", route away instead of forcing submodules.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 3: Choose exactly one primary mode","type":"text"}]},{"type":"paragraph","content":[{"text":"Pick one primary mode for the current run:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"boundary decision","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"add-and-pin","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"bootstrap-and-clone","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sync-to-pinned-commit","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"advance-tracked-branch","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"edit-inside-submodule","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"remove-and-cleanup","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"ci-checkout","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"hosted-constraint","type":"text","marks":[{"type":"strong"}]}]}]}]},{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"hosted-constraint","type":"text","marks":[{"type":"code_inline"}]},{"text":" when the user is blocked by platform rules such as GitHub Pages public-only submodules or stale submodule URL forms, rather than by ordinary local Git usage.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4: Keep the operator invariants visible","type":"text"}]},{"type":"paragraph","content":[{"text":"These truths should survive every answer:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"A superproject records a submodule by ","type":"text"},{"text":"commit","type":"text","marks":[{"type":"strong"}]},{"text":", not by \"latest branch\".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"git submodule update","type":"text","marks":[{"type":"code_inline"}]},{"text":" usually restores the recorded commit and may leave the submodule in detached ","type":"text"},{"text":"HEAD","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":".gitmodules","type":"text","marks":[{"type":"code_inline"}]},{"text":" is part of the contract; branch-tracking intent belongs there when ","type":"text"},{"text":"update --remote","type":"text","marks":[{"type":"code_inline"}]},{"text":" is expected.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"A submodule commit is not reflected in the superproject until the submodule path is staged and committed there.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Recursive bootstrap belongs in onboarding and automation docs if the repo depends on submodules.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Hosted platforms may add visibility, URL, or auth constraints that normal local Git use does not reveal.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 5: Build the submodule brief","type":"text"}]},{"type":"paragraph","content":[{"text":"Return this exact structure:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"# Git Submodule Brief\n\n## Recommended mode\n- Mode: boundary decision | add-and-pin | bootstrap-and-clone | sync-to-pinned-commit | advance-tracked-branch | edit-inside-submodule | remove-and-cleanup | ci-checkout | hosted-constraint\n- Why this mode fits: ...\n\n## Current state\n- Superproject goal: ...\n- Submodule state: ...\n- Auth / CI / hosted context: ...\n- Collaboration risk: solo | shared | unknown\n- Confidence: high | medium | low\n\n## Safest next move\n1. ...\n2. ...\n3. ...\n\n## Commands\n```bash\n...","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Watch-outs","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"...","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"...","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Pointer / branch consequences","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"...","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Adjacent handoff","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"git-workflow","type":"text","marks":[{"type":"code_inline"}]},{"text":" when ...","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"npm-git-install","type":"text","marks":[{"type":"code_inline"}]},{"text":" when ...","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"workflow-automation","type":"text","marks":[{"type":"code_inline"}]},{"text":" when ...","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"\n### Step 6: Use the mode packets, not a giant improvised command dump\nPull the exact packet from [references/mode-packets-and-hosted-constraints.md](references/mode-packets-and-hosted-constraints.md).\n\nRules:\n- `boundary decision` should compare submodule with subtree / vendoring / package delivery directly.\n- `bootstrap-and-clone` and `sync-to-pinned-commit` must preserve the difference between **restore recorded state** and **upgrade pointer**.\n- `advance-tracked-branch` must make branch intent explicit and commit the resulting pointer update in the superproject.\n- `edit-inside-submodule` must avoid detached-`HEAD` commit loss.\n- `ci-checkout` must make private-submodule auth explicit.\n- `hosted-constraint` must call out public-only or URL-form restrictions instead of pretending hosted builds will authenticate like a local clone.\n\n## Output format\nReturn a short operator-style **Git Submodule Brief**.\n\nRequired qualities:\n- pick one workflow mode\n- say whether submodule is actually the right tool\n- make detached-`HEAD` / pointer consequences explicit\n- include CI/auth or hosted-platform notes when relevant\n- route away cleanly when the problem belongs to another skill\n\n## Examples\n\n### Example 1: bootstrap after clone\nInput: \"I cloned the repo and the vendor directory is empty. There's a `.gitmodules` file.\"\nOutput: choose `bootstrap-and-clone`, recommend `git submodule update --init --recursive`, explain that this restores the pinned contents rather than upgrading anything, and mention private-auth caveats if applicable.\n\n### Example 2: update a tracked dependency\nInput: \"We track the main branch of a docs repo as a submodule and want the latest commit.\"\nOutput: choose `advance-tracked-branch`, set or confirm `submodule.\u003cname>.branch`, run `git submodule update --remote \u003cpath>`, then commit the pointer update in the superproject.\n\n### Example 3: choose boundary\nInput: \"Should this shared component repo be a submodule or subtree?\"\nOutput: choose `boundary decision`, compare separate-history/pinning needs against clone simplicity, and route to subtree if consumers should not deal with recursive bootstrap.\n\n### Example 4: hosted-platform constraint\nInput: \"Our GitHub Pages build uses a private docs-theme submodule and keeps failing.\"\nOutput: choose `hosted-constraint`, explain the public-`https://` GitHub Pages limitation, and route away from a private-submodule Pages design instead of pretending auth fixes it.\n\n## Best practices\n1. Start with the boundary decision, not the command list.\n2. Distinguish **match pinned commit** from **advance upstream pointer**.\n3. Treat detached `HEAD` as normal-but-important operator state, not as a mysterious Git bug.\n4. Keep submodule mechanics separate from generic Git history repair.\n5. Make CI checkout, hosted-platform limits, and auth part of the main workflow whenever submodules are involved.\n\n## References\n- [Git Book: Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)\n- [git-submodule documentation](https://git-scm.com/docs/git-submodule)\n- [Atlassian: Git submodule](https://www.atlassian.com/git/tutorials/git-submodule)\n- [Atlassian: Git subtree](https://www.atlassian.com/git/tutorials/git-subtree)\n- [GitHub Actions checkout](https://github.com/actions/checkout#checkout-multiple-repos-private)\n- [GitHub Pages submodule limitations](https://docs.github.com/en/pages/getting-started-with-github-pages/using-submodules-with-github-pages)\n---","type":"text"}]}]},"metadata":{"date":"2026-06-05","name":"git-submodule","author":"@skillopedia","source":{"stars":22,"repo_name":"oh-my-skills","origin_url":"https://github.com/akillness/oh-my-skills/blob/HEAD/.agent-skills/git-submodule/SKILL.md","repo_owner":"akillness","body_sha256":"5b55c62cf7896ad1bd38d1f7e504b15fda105b4b6fdc23d08f35ac9f06fbd443","cluster_key":"f25f59ad3a7986d2cc93416aa3e95b25bba40899dbfb86d1783f553a8cc7b37f","clean_bundle":{"format":"clean-skill-bundle-v1","source":"akillness/oh-my-skills/.agent-skills/git-submodule/SKILL.md","attachments":[{"id":"05381783-9431-5641-8b90-896f305bc303","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/05381783-9431-5641-8b90-896f305bc303/attachment.toon","path":"SKILL.toon","size":1225,"sha256":"d466c7f73a8fb1f89f5ad53c321a885270bc97f7c060107721b1b0bd1834a2c3","contentType":"text/plain; charset=utf-8"},{"id":"f10f0d60-f38b-5b66-9a0c-fd44cae7e9c1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f10f0d60-f38b-5b66-9a0c-fd44cae7e9c1/attachment.json","path":"evals/evals.json","size":3307,"sha256":"07d910e1f1d4fe9d6b1b866b573392ba9e3fa14c5a6ee6da84efcf8c3b05e4b9","contentType":"application/json; charset=utf-8"},{"id":"d227e451-edc5-5ddf-92e1-15d134459ad4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d227e451-edc5-5ddf-92e1-15d134459ad4/attachment.md","path":"references/ci-and-automation.md","size":1396,"sha256":"867cba85ad644d31be00862971cf259c4373ab591393c26f9a3e3cd83e028721","contentType":"text/markdown; charset=utf-8"},{"id":"994ef14a-df35-5e2f-9bc9-0e912e936145","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/994ef14a-df35-5e2f-9bc9-0e912e936145/attachment.md","path":"references/decision-matrix.md","size":2232,"sha256":"c86c9d71e7773e0633da0b989d6d17504361bf1ee9b78f849d475fd3debd2af2","contentType":"text/markdown; charset=utf-8"},{"id":"0873524b-5f8a-5dbe-90aa-9fe351fdf69c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0873524b-5f8a-5dbe-90aa-9fe351fdf69c/attachment.md","path":"references/mode-packets-and-hosted-constraints.md","size":3828,"sha256":"9477464e227ccac1c87b05e760fc5bdef99d1ea997e56943403b935f43801f48","contentType":"text/markdown; charset=utf-8"},{"id":"f5137052-7a00-5094-8f27-240606cd3a47","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f5137052-7a00-5094-8f27-240606cd3a47/attachment.md","path":"references/update-and-detached-head.md","size":1759,"sha256":"649c16f63984a415e737a49d85a3fc850837812064b8e2ea6d055491689c24ca","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"e2774f85bd8025266ce9dcda289f6cc8655dd7fca043a5155e0b32fb1760641e","attachment_count":6,"text_attachments":5,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":1,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":".agent-skills/git-submodule/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"integrations-apis","metadata":{"tags":"git, submodule, subtree, dependencies, version-control, ci, repo-structure","source":"akillness/oh-my-skills","version":"2.1.0","platforms":"Claude, ChatGPT, Gemini, Codex, OpenCode"},"import_tag":"clean-skills-v1","description":"Decide when Git submodules are the right external-repo boundary, then choose one safe operator flow: add and pin, bootstrap recursively, sync to the recorded commit, advance a tracked branch, edit inside the submodule without detached-HEAD surprises, remove cleanly, or configure CI/hosted-platform checkout constraints. Use when the user asks about `.gitmodules`, `git submodule`, recursive clone/setup, pointer updates, detached HEAD, private submodules in CI, GitHub Pages submodule limits, or submodule vs subtree/vendoring/package delivery. Not for generic Git history cleanup or package-manager dependency delivery.\n","allowed-tools":"Bash Read Write Edit Glob Grep","compatibility":"Best for repositories where Git CLI is available and the main problem is the repo boundary around external code: submodule choice, bootstrap, pointer updates, detached-HEAD handling, or CI / hosted-platform behavior.\n"}},"renderedAt":1782979275655}

Git Submodule Use this skill as the repository's Git submodule choice and operator-workflow anchor . The job is not to dump every command in one blob. The job is to: 1. decide whether submodule is the right boundary at all, 2. choose one operating mode, 3. keep pinned-commit, detached- , and hosted-platform consequences explicit, 4. emit the next safe commands only for that mode. Read references/decision-matrix.md first. Read references/update-and-detached-head.md when the request involves pointer updates, detached , or editing inside the submodule. Read references/ci-and-automation.md for CI…