librarian

Cache and refresh remote git repositories under ~/.cache/checkouts.

102|4|Updated Apr 15, 2009
One-click install
npx skills add https://github.com/mikker/dotfiles --skill librarian-mikker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: librarian
Source: https://github.com/mikker/dotfiles/tree/main/agents.symlink/skills/librarian
Command: npx skills add https://github.com/mikker/dotfiles --skill librarian-mikker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Cache and refresh remote git repositories under ~/.cache/checkouts/<host>/<org>/<repo> so future references can reuse a local copy. Use this skill when the user points you to a remote git repository as reference or you encountered a remote git repo through other means.

Core Features & Use Cases

  • Stable, predictable local checkout path under the cache root for repeated references and offline work.
  • Up-to-date contents via throttled updates or explicit refresh, with a fast-forward merge when possible.
  • Flexible URL handling (https, ssh, git@, owner/repo shorthand) and automatic origin normalization to a canonical HTTPS URL.

Quick Start

Cache a repository by providing its host, organization, and repository, or a shorthand, to create and manage the local checkout.

Frequently Asked Questions about librarian

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

FAQPage Schema
How do I cache a remote git repository for fast local checkouts?▼

Cache a remote git repository by providing its URL or owner/repo shorthand to create a persistent local checkout under ~/.cache/checkouts. This stores a reusable local copy for fast checkouts and offline work.

How does a cached git repository stay up to date with the remote?▼

A cached git repository stays up to date through throttled updates or explicit refresh commands that perform a fast-forward merge when possible. This ensures your local checkout reflects the latest remote changes without redundant downloads.

Can I use SSH or shorthand URLs to clone and cache a git repository?▼

Yes, you can use SSH, git@, HTTPS, or owner/repo shorthand URLs to cache a git repository. The tool automatically normalizes origins to a canonical HTTPS URL and stores checkouts under a predictable host, organization, and repository path.

What is the best way to manage multiple remote git repositories for offline reference?▼

The best way to manage multiple remote git repositories for offline reference is caching them under a structured local directory like ~/.cache/checkouts. This provides predictable paths for repeated references and supports throttled updates to keep contents current.

Do I need Git installed to cache and refresh repositories locally?▼

Yes, you need Git installed and a shell environment to cache and refresh repositories locally. The tool relies on Git to normalize origins, handle multiple URL formats, and manage fast-forward merges for stable local checkouts.