Agent Skills: Shallow Clone

Perform a shallow clone of a Git repository to a temporary location.

UncategorizedID: opendatahub-io/ai-helpers/git-shallow-clone

Install this agent skill to your local

pnpm dlx add-skill https://github.com/opendatahub-io/ai-helpers/tree/HEAD/helpers/skills/git-shallow-clone

Skill Files

Browse the full folder contents for git-shallow-clone.

Download Skill

Loading file tree…

helpers/skills/git-shallow-clone/SKILL.md

Skill Metadata

Name
git-shallow-clone
Description
Perform a shallow clone of a Git repository to a temporary location.

Shallow Clone

Provides a script for creating a shallow clone of a Git repository to a temporary location. This skill should be used to analyze repository contents locally instead of using web APIs.

Usage

Use the scripts/shallow-clone.sh script in this directory, for example:

./scripts/shallow-clone.sh <repository_url> [<tag_or_branch>]

The script will print the path to the cloned repository when done, for example:

$ ./scripts/shallow-clone.sh https://github.com/psf/requests.git
Cloning https://github.com/psf/requests.git (shallow, ref: HEAD) to /tmp/shallow-clone-DDqkuv...
/tmp/shallow-clone-DDqkuv/repo

After analyzing the local repository, clean up the temporary directory with:

$ rm -rf <path_to_temporary_directory>