# Git Shallow Clone

> Perform a shallow clone of a Git repository to a temporary location. Use when this capability is needed.

- Skill: `tomevault-io/git-shallow-clone` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/git-shallow-clone`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/git-shallow-clone/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/git-shallow-clone

---


# 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:

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

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

```shell
$ ./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:

```shell
$ rm -rf <path_to_temporary_directory>
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/opendatahub-io) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

