checkout

Clone and cache remote git repositories to stable local paths for code reading and searching.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/sndrgrdn/skills --skill checkout-sndrgrdn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: checkout
Source: https://github.com/sndrgrdn/skills/tree/main/checkout
Command: npx skills add https://github.com/sndrgrdn/skills --skill checkout-sndrgrdn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When you need to inspect code from a remote GitHub, GitLab, or Bitbucket repository, manually cloning and keeping it updated is repetitive. This Skill resolves any repository reference to a cached local checkout so you can immediately read and search the code. ## Core Features & Use Cases - Flexible Reference Parsing: Accepts HTTPS URLs, git@ SSH references, ssh:// URLs, and owner/repo shorthand, normalizing them to a canonical host/org/repo path. - Cached Partial Clones: Clones with --filter=blob:none on first use, then fetches and fast-forwards on a configurable throttle, returning the cached copy even when offline. - Use Case: A user asks you to review the authentication logic in github.com/acme/api. Run the checkout script, get the local path under ~/.cache/checkouts, and search the codebase directly without manual cloning. ## Quick Start Resolve the repository github.com/owner/repo to a local checkout so you can read and search its code.

Frequently Asked Questions about checkout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clone a GitHub repository to a local cache for reading?▼

Run the checkout script with the repository reference, such as checkout.sh owner/repo or a full URL. It clones to ~/.cache/checkouts/<host>/<org>/<repo> using a partial clone and prints the local path for searching and reading.

What repository URL formats does git checkout caching support?▼

The script accepts HTTPS URLs, git@ SSH references, ssh:// URLs, and owner/repo shorthand defaulting to github.com. Deep links like /tree or /pull are normalized to the base owner/repo path.

Does the cached checkout stay up to date with the remote?▼

Yes, the script fetches and fast-forwards on a throttle controlled by CHECKOUT_UPDATE_INTERVAL, defaulting to 300 seconds. Pass --force-update to refresh immediately regardless of the throttle.

What happens if the git fetch fails or I am offline?▼

If the fetch fails, the script prints a warning and returns the existing cached checkout anyway, which may be stale. This ensures you can still read the code without network access.

Can I edit files inside the shared checkout cache?▼

No, you should not edit inside the shared cache because it is reused across tasks. Copy files out or create a git worktree for task-specific changes instead.