/repo-bootstrap:submodule-setupfrom repo-bootstrap
Automates git submodule architecture setup with GitHub Actions for multi-repo synchronization. Transforms branch-based content into always-present submodule directories.
Ships in repo-bootstrap. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Result:
parent-repo/
├── src/
├── docs/ <- submodule (always present)
└── exports/ <- submodule (always present)
This skill is phase-driven and the phase bodies are long. Load what the current step needs rather than reading everything up front:
| File | Read it when |
|---|---|
references/phases.md | Running any phase — full bodies for Phases 0-10 and Finalization |
references/protocols.md | You need the manual-intervention handoff format, state-file schema, or default escalation rules |
references/troubleshooting.md | A phase fails or a submodule misbehaves |
references/decision-rationale.md | The user asks why submodules over alternatives |
Templates live in assets/, helper scripts in scripts/, both under this skill's
base directory; references/phases.md names it <skill>.
"${CLAUDE_PLUGIN_ROOT}/skills/submodule-setup/scripts/validate-prerequisites.sh"
Required:
gh) installed and authenticated/plugin marketplace add bengous/claude-code-plugins, then /plugin install secret-pane@bengous-plugins): Phase 3 collects the PAT through its masked box, never through the chatPhase 0: Backup → Phase 1: Parameters → Phase 2: Create Repos → Phase 3: PAT/Secrets
↓
Phase 10: Validate ← Phase 9: Docs ← Phase 8: Hooks ← Phase 7: Scripts ← Phase 6: Actions
↑
Phase 5: Add Submodules ← Phase 4: Migrate (conditional)
| Phase | Purpose |
|---|---|
| 0 | Backup checkpoint — recovery point before any modification |
| 1 | Parameter collection |
| 2 | Create submodule repos |
| 3 | PAT and secrets setup |
| 4 | Content migration (conditional — see below) |
| 5 | Add submodules to parent |
| 6 | Deploy GitHub Actions |
| 7 | Deploy local scripts |
| 8 | Claude Code hooks (optional) |
| 9 | Update documentation |
| 10 | Validation |
Run each phase from references/phases.md, which carries that phase's escalation
conditions, checkpoint writes, and audit events.
<decision_criteria id="phase4"> Phase 4 Decision:
SOURCE_BRANCHES in Phase 1SOURCE_BRANCHES is empty or user says "start fresh"
</decision_criteria><resume_behavior> On Resume:
.submodule-setup-state.json"status": "in_progress"repos_created list)"status": "pending" phase
</resume_behavior>
| Task | Command |
|---|---|
| Init after clone | ./scripts/setup-dev.sh |
| Check for uncommitted | ./scripts/check-nested-repos.sh |
| Check for unpushed | ./scripts/check-nested-repos.sh --end-of-task |
| Resume interrupted setup | Read .submodule-setup-state.json and continue from current_phase |
scripts/validate-prerequisites.sh - Run before starting setupscripts/create-backup.sh - Create backup checkpoint before modificationsscripts/setup-dev.sh - Template for new clone initializationscripts/check-nested-repos.sh - Template for commit validationassets/update-submodules.yml - GitHub Action for parent repo (Pull Model)assets/update-submodules-push.yml - GitHub Action for parent repo (Push Model)assets/notify-parent.yml - GitHub Action for each submoduleassets/notify-dependent.yml - GitHub Action for cross-repo notificationsassets/README-template.md - Documentation template for project READMEassets/README-template.md (opens in a new tab)assets/notify-dependent.yml (opens in a new tab)assets/notify-parent.yml (opens in a new tab)assets/update-submodules-push.yml (opens in a new tab)assets/update-submodules.yml (opens in a new tab)references/decision-rationale.md (opens in a new tab)references/phases.md (opens in a new tab)references/protocols.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)scripts/check-nested-repos.sh (opens in a new tab)scripts/create-backup.sh (opens in a new tab)scripts/setup-dev.sh (opens in a new tab)scripts/test-scripts.sh (opens in a new tab)scripts/validate-prerequisites.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub bengous/claude-code-plugins --plugin repo-bootstrap