librarian

Cache and refresh remote git repositories under stable local checkout paths.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/v36372/pi-stuff --skill librarian-v36372
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: librarian
Source: https://github.com/v36372/pi-stuff/tree/main/skills/librarian
Command: npx skills add https://github.com/v36372/pi-stuff --skill librarian-v36372

SYSTEM DOCUMENTATION & REQUIREMENTS

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. This approach provides stable, reusable checkouts that avoid repeated clones and reduce network usage.

Core Features & Use Cases

  • Stable local checkout paths at ~/.cache/checkouts/<host>/<org>/<repo>, enabling quick reuse.
  • Up-to-date content via throttled fetches with optional force update and fast-forward merges when safe.
  • Efficient cloning with partial clone (blob filtering) and automatic origin normalization to reliable HTTPS URLs.
  • Use Cases: When you need to reference long-lived remote repos in analysis or workflows without re-cloning, or when cross-referencing multiple tasks to the same repo.

Quick Start

Run checkout.sh <repo> --path-only to print the local checkout path.

Frequently Asked Questions about librarian

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

FAQPage Schema
How do I cache remote git repositories for fast local checkouts?

To cache remote git repositories, run checkout.sh against a Git host URL or owner/repo shorthand. The system clones content under ~/.cache/checkouts/<host>/<org>/<repo>, creating a stable, reusable local path.

How does the local checkout cache stay up to date with the remote repository?

The local checkout cache stays up to date using throttled fetches that limit network requests. When safe, the system applies fast-forward merges to refresh the local copy, and you can force an update if needed to overwrite local changes.

Can I get just the local checkout path without loading the full repository content?

Yes, you can retrieve the local checkout path without loading full content by using the --path-only option. This minimal context loading feature prints the predictable ~/.cache/checkouts path for quick reference in workflows.

Does the git cache checkout support partial clones to reduce network usage?

Yes, the git cache checkout supports efficient cloning with partial clone and blob filtering. This approach reduces network usage and speeds up initial cloning when caching remote repositories for future reference.

What is the best way to reuse a local git clone across multiple workflows?

The best way to reuse a local git clone across multiple workflows is caching it under a stable, predictable path at ~/.cache/checkouts/<host>/<org>/<repo>. Future references simply use this local copy, avoiding repeated clones and reducing network usage.