agentsclimarketplace

Repository cloning with recursive submodules

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/repository-cloning-with-recursive-submodules

Use when you need to set up a development environment for a project that declares Git submodules (typically listed in .gitmodules), particularly when the build system (qmake, make, Maven, etc.) expects all dependencies to be present in the working tree.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill repository-cloning-with-recursive-submodules

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.2 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

repository-cloning-with-recursive-submodules

Summary

Clone a Git repository and all of its nested submodules in a single operation, ensuring that all interdependent source trees (e.g., Maven GUI and Maven Core libraries) are available locally for compilation. This skill is essential when a project's build depends on multiple versioned library repositories managed as Git submodules.

When to use

Use this skill when you need to set up a development environment for a project that declares Git submodules (typically listed in .gitmodules), particularly when the build system (qmake, make, Maven, etc.) expects all dependencies to be present in the working tree. The Maven GUI project uses this pattern: the main repository declares maven_core as a submodule, so a shallow clone would fail at the configuration or compilation step.

When NOT to use

  • The project has no declared submodules (use git clone without --recursive for simpler, faster clones).
  • You only need to inspect or modify the main repository and do not need the submodule source code for your analysis.
  • Submodule repositories are unavailable or access-restricted; in this case, a recursive clone will hang or fail.

Inputs

  • Git repository URL (SSH or HTTPS) pointing to a project with declared submodules
  • .gitmodules configuration file (implicitly read by git)
  • Target directory path for the local clone

Outputs

  • Local working directory containing the main repository and all initialized submodule trees
  • Hidden .git directory with full commit history and submodule metadata
  • Source files ready for downstream build steps (qmake configuration, make compilation)

How to apply

Run git clone --recursive with the target repository URL to initialize and populate all declared submodules in a single pass, avoiding the two-step process of cloning then running git submodule update --init --recursive. The --recursive flag automatically fetches submodule metadata from .gitmodules and checks out the pinned commit for each submodule. For Maven GUI, this ensures that both the main application source tree and the maven_core library tree are present before invoking qmake and make. Verify success by confirming that subdirectories listed in .gitmodules (e.g., maven_core) contain populated source trees, not empty directories.

Related tools

Examples

git clone --recursive [redacted-email]:eugenemel/maven.git maven

Evaluation signals

  • The cloned directory structure includes both the main repository and populated submodule directories (e.g., maven_core with source files, not empty).
  • Running git submodule status within the cloned directory shows all submodules at their pinned commits with no '-' (uninitialized) prefix.
  • Subsequent build steps (e.g., qmake -r build.pro and make -j4) execute without 'file not found' or 'missing dependency' errors related to submodule code.
  • The .git/config file contains [submodule] sections with correct paths and URLs for all declared submodules.
  • No need to run git submodule update --init --recursive after cloning; all submodules are immediately usable.

Limitations

  • Network bandwidth and time scale with repository size; recursive cloning of large projects with many submodules may take several minutes.
  • SSH authentication: SSH-based URLs require configured SSH keys; HTTPS URLs may be more reliable if SSH access is restricted.
  • Submodule pinning: the clone checks out the exact commit recorded in the main repository's .gitmodules and index, not the latest main branch of each submodule; this is intentional but may result in outdated submodule code if dependencies have been updated.
  • No offline fallback: recursive cloning requires network connectivity to all submodule repositories; intermittent connection loss may require re-running the full clone.

Evidence

  • [other] Clone the maven repository recursively from github.com/eugenemel/maven using git.: "Clone the maven repository recursively from github.com/eugenemel/maven using git"
  • [readme] Cloning behavior and submodule reference in the maven_core README.: "git clone [redacted-email]:eugenemel/maven_core.git maven_core"
  • [readme] Submodule warning message during clone operation.: "Cloning into 'maven_core'... warning: redirecting to https://github.com/eugenemel/maven_core/"
  • [other] Workflow dependency on successful clone prior to build configuration.: "Set up the build environment by installing Qt5, qmake, and make on the target platform"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.