# Clone Software Repo

> Clone a GitHub repo into 02_Programs/3-Software/ ready for terminal-agent work — SSH-rewritten (HTTPS auth is broken in this env), with Google-Drive-safe defaults (core.fileMode false + post-clone fsck). Use when the user pastes a GitHub URL and wants it cloned locally, or says "clona este repo", "trae este repo a local", "clónalo a 3-software", "clone this repo", "setup this repo locally", "bája…

- **Type:** Skill
- **Install:** `agentstack add skill-theveller-claude-skills-clone-software-repo`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [TheVeller](https://agentstack.voostack.com/s/theveller)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [TheVeller](https://github.com/TheVeller)
- **Source:** https://github.com/TheVeller/claude-skills/tree/main/skills/engineering/clone-software-repo

## Install

```sh
agentstack add skill-theveller-claude-skills-clone-software-repo
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Clone Software Repo → 3-Software

Single-shot skill: take a GitHub link, clone it into `02_Programs/3-Software/` with the defenses this vault needs (it lives inside Google Drive, and HTTPS git auth is broken here). Output is a tight "what landed + how to run it" summary.

## When to use

User pastes a GitHub URL (or `owner/repo`) and wants it on local disk to work with terminal agents. NOT for: re-cloning the GPT Chain `_initiatives-software` repos (that's `[[gpt-chain-refresh]]`), or creating a brand-new project from scratch (that's a Lovable/scaffold flow).

## Environment facts (must honor)

- **HTTPS auth is broken** → always clone over SSH. The script rewrites `https://github.com/OWNER/REPO` → `git@github.com:OWNER/REPO.git` automatically. See `[[reference-github-https-broken-use-ssh]]`.
- **Vault is inside Google Drive** → Drive flips permission bits and can corrupt `.git` over time. The script sets `git config core.fileMode false` and runs `git fsck` right after clone. See `[[project-code-repos-under-gdrive-corrupt]]`.
- **Target is always** `02_Programs/3-Software/`. Existing repos there (e.g. `distilledbrew`, `preview-canvas-studio`) are cloned as plain subfolders — no companion vault page is required.

## Workflow

### Step 1 — Run the clone script

```bash
bash .claude/skills/clone-software-repo/scripts/clone-to-software.sh  [target-name]
```

- Accepts `https://github.com/OWNER/REPO[.git]`, `git@github.com:OWNER/REPO.git`, bare `OWNER/REPO`, or a `…/tree/BRANCH` link (branch is honored).
- `[target-name]` is optional — defaults to the repo name. Use it to avoid a name clash or rename on disk.
- Add `--dry-run` to print the parsed owner/repo/target without cloning (use it if the URL looks unusual before committing).
- The script refuses to overwrite an existing folder (exit 3) — never clobber.

The script prints a final block: `path`, `branch`, `latest commit`, `stack/install`, whether `.env` and agent docs (`AGENTS.md`/`CLAUDE.md`) are present.

### Step 2 — Report to the user

Relay a tight summary:

| Field | Value |
|---|---|
| Repo | `owner/repo` |
| Landed at | `02_Programs/3-Software/` |
| Branch · latest | `main` · `sha "msg"` |
| Install | e.g. `bun install` |
| Has `.env` / agent docs | yes/no |

Then the obvious next step: `cd "02_Programs/3-Software/" && `, and (if no `.env` but an `.env.example` exists) note they'll need to fill secrets. If the repo has no `AGENTS.md`/`CLAUDE.md`, offer to scaffold one so terminal agents have context (don't auto-create).

## Failure modes

- **Bad/unparseable URL** (exit 2): show what was passed; ask for a clean `owner/repo` or full github.com link.
- **Target exists** (exit 3): don't overwrite. Offer a different `[target-name]`, or confirm before removing the old one.
- **Clone failed** (exit 4): almost always SSH key / access (private repo, wrong org). Confirm `ssh -T git@github.com` works and the user has access; HTTPS is NOT a fallback here.
- **fsck corrupt right after clone** (exit 5): Drive interfered mid-clone. Remove the partial dir and retry; if it recurs, clone OUTSIDE Drive and symlink, or mark the folder available-offline first.

## Notes

- No commits, installs, or dev servers are run by this skill — it clones + configures + reports. The user runs install/dev themselves (or asks next).
- Multiple repos: invoke once per URL (keeps each clone's output clean). For a batch, loop the script over the list in one Bash call.

## Related

- `[[reference-github-https-broken-use-ssh]]` · `[[project-code-repos-under-gdrive-corrupt]]`
- `02_Programs/3-Software/SETUP_MAPPING.md` — optional richer per-project vault structure if a repo graduates to a tracked project
- Sibling: `[[gpt-chain-refresh]]` (refresh existing cloned repos)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [TheVeller](https://github.com/TheVeller)
- **Source:** [TheVeller/claude-skills](https://github.com/TheVeller/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-theveller-claude-skills-clone-software-repo
- Seller: https://agentstack.voostack.com/s/theveller
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
