git-checkout-cache

git-checkout-cache is a skill for Claude Code, Codex from aretw0/agents-lab. It costs 59 tokens per session (784 once invoked), scanned A, original, MIT.

A helper for keeping partial local copies of remote Git repositories, which are projects hosted on services such as GitHub or GitLab. It refreshes an existing checkout and avoids repeatedly downloading the full repository.

In plain words
What is it for?
Use it when a remote repository is supplied as a reference for code analysis, documentation, or comparison.
Why use it?
It provides a predictable reusable copy for reading or searching remote code while using less storage and time than repeated full clones.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when a remote repository is supplied as a reference for code analysis, documentation, or comparison.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aretw0/agents-lab/git-checkout-cache
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aretw0/agents-lab --skill git-checkout-cache
Clone the repo
git clone --depth 1 https://github.com/aretw0/agents-lab

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-checkout-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/aretw0/agents-lab/git-checkout-cache/github.svg)](https://agentmods.dev/skills/aretw0/agents-lab/git-checkout-cache)
Your own site
<a href="https://agentmods.dev/skills/aretw0/agents-lab/git-checkout-cache"><img src="https://agentmods.dev/badge/skills/aretw0/agents-lab/git-checkout-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-checkout-cache

Your own site · 80×15
<a href="https://agentmods.dev/skills/aretw0/agents-lab/git-checkout-cache"><img src="https://agentmods.dev/badge/skills/aretw0/agents-lab/git-checkout-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 784 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00784
Opus 5.5 $0.00024 $0.00314
Sonnet 5.5 $0.00012 $0.00157
Haiku 4.5 $0.00006 $0.00078

Measured 1mo ago against content hash 98da88b9400d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-checkout-cache scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (checkout.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/git-skills/skills/git-checkout-cache/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use this skill when the user points you to a remote git repository (GitHub/GitLab/Bitbucket URLs, git@..., or owner/repo shorthand) as a reference for reading or analysis.

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

~/.cache/checkouts/<host>/<org>/<repo>

Example: github.com/aretw0/agents-lab → ~/.cache/checkouts/github.com/aretw0/agents-lab

Command

Use the versioned helper from this skill directory. From the repository root:

bash packages/git-skills/skills/git-checkout-cache/checkout.sh <repo> --path-only

Examples:

bash packages/git-skills/skills/git-checkout-cache/checkout.sh aretw0/agents-lab --path-only
bash packages/git-skills/skills/git-checkout-cache/checkout.sh github.com/mitsuhiko/minijinja --path-only
bash packages/git-skills/skills/git-checkout-cache/checkout.sh https://github.com/mitsuhiko/minijinja --path-only
bash packages/git-skills/skills/git-checkout-cache/checkout.sh [email protected]:mitsuhiko/minijinja.git --path-only

Avoid recipes that set shell variables in the pi bash tool command string (for example CACHE=...; echo $CACHE), because some harnesses can pre-expand $VAR before the command reaches bash. Prefer direct helper arguments and literal paths.

The script will:

  1. Parse the repo reference into host/org/repo
  2. Clone if missing (partial clone with --filter=blob:none)
  3. Reuse existing checkout if present
  4. Fetch from origin when stale (default interval: 300s)
  5. Attempt fast-forward merge if checkout is clean and has upstream

Force refresh

bash packages/git-skills/skills/git-checkout-cache/checkout.sh <repo> --force-update --path-only

Dry-run/path validation

For local smoke checks or path-only planning without network access:

bash packages/git-skills/skills/git-checkout-cache/checkout.sh <repo> --dry-run --path-only

Read the full file on GitHub · 75 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 75 lines · 59 tokens per session scan A 98da88b9400d

Subscribe to this mod's changes

git-checkout-cache is a skill published in the GitHub repository aretw0/agents-lab (11 stars, last pushed 3mo ago), licensed MIT. It adds 59 tokens to every session and 784 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

release-notes

Write release notes for a tagged release — a business-impact summary of what changed for the user, plus a thanks section naming every contributor whose commits are in the release. Short by construction.

no-human-ai/no_human · 41 tokens

review-this-branch

Run the nohuman review gate (fresh-session adversarial reviewer + tamper guard) over the current branch or a GitHub pull request, with no server, no database, and no onboarding, and relay the pass/fail checklist.

no-human-ai/no_human · 53 tokens

pi-package-sandbox-test

Use when verifying that published Pi packages install and load for normal users, including pi.dev package compatibility checks, release validation, Daytona sandbox tests, and package installability audits.

spences10/my-pi · 40 tokens

release

Create a new versioned release with changelog. Bumps version in code, updates CHANGELOG.md, commits, tags, and pushes using the repository release flow. GitHub Actions creates the release and uses only the current changelog section as release notes. Use when the user says "release", "cut a release", "bump version"…

genai-io/san · 75 tokens

agentbro-pr-merge

Use when reviewing, fixing CI for, approving workflows for, or merging AgentBro pull requests into dev/main, especially external contributor PRs where contributor attribution matters.

shirenchuang/agentbro · 38 tokens

pi-release-workflow

Use when preparing or validating Pi monorepo releases, including Changesets, pnpm lockfile updates, package previews, release-age policy, and installability checks.

spences10/my-pi · 38 tokens