Reference Module
Trigger: use when the user asks to research another git repository.
Workflow
Choose target path:
-
default to references/<repo-name>
-
only exception is a user-provided path when the skill is called
Collect required inputs:
-
repository URL (https://... or git@... )
-
optional branch/tag/commit override
Confirm behavior for this run:
-
default is pinning to the latest available commit at HEAD (or branch HEAD when -b <branch> is used) at add time
-
explicitly confirm this default with the user every time before running commands
Add the submodule from this repo root:
git submodule add
If a branch is specified:
git submodule add -b
Initialize recursively when needed:
git submodule update --init --recursive
If a specific commit or tag is requested, check it out inside the submodule and stage the submodule pointer update.
Treat submodule contents as read-only for research unless the user explicitly asks for edits.
Report the outcome:
-
submodule path
-
source URL
-
checked-out commit SHA