clone-with-hash

Installation
SKILL.md

Clone With Hash

Overview

Create a fresh git clone in a unique -<hash> folder under a chosen parent directory (default: home), then check out a new branch from origin/main (or another base branch if specified).

Workflow

  1. Identify the source repo (local path or remote URL).
  2. Choose the parent directory (default: ~) and suffix length (default: 6).
  3. Derive the base name from the repo path or URL (strip trailing .git).
  4. Generate a random hex suffix, build the destination path, and ensure it does not exist.
  5. Run git clone <src> <dest>, then git checkout -b <branch> origin/<base>.
  6. Report the destination path and created branch.

Quick Commands

python - <<'PY'
Related skills
Installs
2
Repository
b1tank/skills
GitHub Stars
1
First Seen
Apr 4, 2026