Skip to content

fix: initialize git submodules when cloning repositories#646

Open
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:fix/git-submodules
Open

fix: initialize git submodules when cloning repositories#646
elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
elliotllliu:fix/git-submodules

Conversation

@elliotllliu
Copy link
Contributor

Summary

Closes #492

When a skill repository uses git submodules, skills add now initializes them so skills in submodule directories are discoverable.

Changes

After cloning, runs git submodule update --init --recursive --depth 1:

  • Shallow depth (--depth 1) to minimize clone overhead
  • Best-effort — if no submodules exist or init fails, cloning proceeds normally (no user-visible change)
  • Works with both --branch (ref) and default branch clones

Testing

All 375 existing tests pass. The change is backward-compatible — repos without submodules are unaffected.

After cloning a repository, run `git submodule update --init
--recursive --depth 1` to initialize any submodules. This allows
skills in submodule directories to be discovered by `skills add`.

The submodule init is best-effort with shallow depth to minimize
overhead — if no submodules exist or init fails, cloning proceeds
normally.

Closes vercel-labs#492
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support git submodules when cloning repositories

1 participant