Skip to content
Agentmart
Submit a tool

pac-librarian

Use when the task requires inspecting, searching, or comparing remote Git repository contents, whether the source reference comes from the user or…

Skill by mypac

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ladislas-pac-librarian

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when the task requires inspecting, searching, or comparing remote Git repository contents, whether the source reference comes from the user or investigation. Reuse and refresh managed checkouts under ~/.cache/checkouts/<host>/<org>/<repo>. An incidental repository reference alone does not trigger checkout.

Use cases: productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pac-librarian

What's inside

Skill name
pac-librarian
Description
Use when the task requires inspecting, searching, or comparing remote Git repository contents, whether the source reference comes from the user or investigation. Reuse and refresh managed checkouts under ~/.cache/checkouts/<host>/<org>/<repo>. An incidental repository reference alone does not trigger checkout.
License
MIT
Compatibility
Pi coding agent; git and bash required.
Metadata
stage: shared · author: mypac
Instructions
71 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (4)

  • SKILL.md
  • checkout.integration.mjs
  • checkout.sh
  • checkout.test.mjs

SKILL.md (first lines)

# Cache remote repository checkouts

Use this skill when answering the task requires inspecting, searching, or comparing remote Git repository contents, whether the reference comes from the user or investigation (GitHub/GitLab/Bitbucket URLs, `git@...`, or `owner/repo` shorthand). Use the managed cache below rather than an ad-hoc fresh clone.

A repository reference used only as attribution, a citation, a dependency name, an issue/PR link, or contextual background does not by itself justify cloning or refreshing.

The goal is to keep a reusable local checkout that is:

- **stable** (predictable path)
- **up to date** (periodic fetch + fast-forward when safe)
- **efficient** (shallow partial clone with `--depth=1 --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 checkout.sh <repo> --path-only
```

Examples:

```bash
bash checkout.sh mitsuhiko/minijinja --path-only
bash checkout.sh github.com/mitsuhiko/minijinja --path-only
bash checkout.sh https://github.com/mitsuhiko/minijinja --path-only
```

The script will:

1. Parse the repo reference into host/org/repo.
2. Shallow-clone it 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.
- Shallow refreshes deepen the existing boundary enough to retain fast-forward ancestry across newly added upstream commits. They remain shallow unless the boundary reaches the repository root naturally.
- Checkouts that another workflow has unshallowed use an ordinary full-history fetch and remain full-history.
- `--path-only` prints a path only when the checkout is current. If fetched upstream work cannot be applied because tracked files are dirty, history diverged, or no upstream is configured, it reports the stale state on stderr and exits nonzero without discarding local work.
- Force immediate refresh with:

```bash
bash checkout.sh <repo> --force-update --path-only
```

## Recommended workflow

1. Resolve repository path via `checkout.sh --path-only`.
2. Use that path for searching, reading, and analysis.
3. When later source inspection of the same repo is needed, call `checkout.sh` again; it will find and update the cached checkout.

## If edits are needed

Prefer not to edit directly in the shared cache. Create a separate worktree or copy from the cached checkout for task-specific modifications.

## Notes

- `owner/repo` defaults to `github.com`.

From ladislas/mypac, MIT.

More from ladislas/mypac

Signals

Stars
2
Forks
1
Open issues
3
Last commit (this folder)
Oct 16, 2026 (13 days ago)
Last release
Oct 15, 2026 (14 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mypac

Cite this page

pac-librarian skill. Agent Mart. https://agentmart.dev/skills/ladislas-pac-librarian (last updated 2026-10-24)