# Tmp Git Clone

> Clone git repos to a temp folder for quick exploration. Use when you need to examine a codebase, look up docs, or explore repo structure.

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

---


# tmp-git-clone

Clone git repos to `~/.tmp-git-clone/{owner}/{repo}` for quick exploration. Shallow clone by default for speed.

## Quick Start

```bash
# GitHub shorthand (recommended)
tmp-git-clone rails/rails

# Full URL
tmp-git-clone https://github.com/rails/rails

# SSH
tmp-git-clone git@github.com:rails/rails.git
```

## Common Options

```bash
# Clone specific branch
tmp-git-clone -b 7-2-stable rails/rails

# Deeper clone for history
tmp-git-clone --depth 10 rails/rails

# Quiet mode (outputs only path for scripting)
tmp-git-clone -q rails/rails

# Copy path to clipboard
tmp-git-clone -c rails/rails
```

## Commands

| Command | Description |
|---------|-------------|
| `tmp-git-clone list` | List all cloned repos |
| `tmp-git-clone clean --yes` | Remove all clones |
| `tmp-git-clone history` | Show recent clones |
| `tmp-git-clone config` | Show configuration |

## Workflow for Exploration

1. Clone the repo: `tmp-git-clone owner/repo`
2. Note the output path: `~/.tmp-git-clone/owner/repo`
3. Read files, explore structure, analyze code
4. Clones auto-cleanup after 3 days

## Configuration

Create `~/.tmp-git-clone/config.json` for defaults:

```json
{
  "copy": true,
  "depth": 1,
  "defaultBranch": null
}
```

## Requirements

- Node.js 18+
- Git

## Installation

```bash
# npx (no install needed)
npx github:lirrensi/tmp-git-clone rails/rails

# Or install globally
npm install -g github:lirrensi/tmp-git-clone
```

