librarianlisted
Install: claude install-skill shekohex/dotai
Use this skill when the user points you to a remote git repository (GitHub/GitLab/Bitbucket URLs, `git@...`, or `owner/repo` shorthand).
The goal is to keep a reusable local checkout that is:
- **stable** (predictable path)
- **up to date** (periodic fetch + fast-forward when safe)
- **efficient** (partial clone with `--filter=blob:none`, no repeated full clones)
## Cache location
Repositories are stored at:
`~/.cache/checkouts/<host>/<org>/<repo>`
Example:
`github.com/mitsuhiko/minijinja` → `~/.cache/checkouts/github.com/mitsuhiko/minijinja`
## Command
```bash
bash <skill-dir>/scripts/checkout.sh <repo> --path-only
```
Examples:
```bash
bash <skill-dir>/scripts/checkout.sh mitsuhiko/minijinja --path-only
bash <skill-dir>/scripts/checkout.sh github.com/mitsuhiko/minijinja --path-only
bash <skill-dir>/scripts/checkout.sh https://github.com/mitsuhiko/minijinja --path-only
```
The script will:
1. Parse the repo reference into host/org/repo.
2. Clone if missing.
3. Reuse existing checkout if present.
4. Fetch from `origin` when stale (default interval: 300s).
5. Attempt a fast-forward merge if the checkout is clean and has an upstream.
## Update strategy
- Default behavior is **throttled refresh** (every 5 minutes) to avoid unnecessary network calls.
- Force immediate refresh with:
```bash
bash <skill-dir>/scripts/checkout.sh <repo> --force-update --path-only
```
## Citation rules:
- Code-content claims: cite `absolute/local/path:lineStart-lineEnd` from explicit r