Agent skill

Librarian

by mitsuhiko in mitsuhiko/agent-stuff

Cache and refresh remote git repositories under ~/.cache/checkouts/<host/<org/<repo so future references can reuse a local copy.

Apache-2.0Auto-check passedDevelopment

Install Librarian

skills CLI
$ npx skills add mitsuhiko/agent-stuff --skill librarian -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mitsuhiko/agent-stuff librarian --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mitsuhiko/agent-stuff.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/librarian .claude/skills/librarian && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
librarian
GitHub stars
3.2k
Used in
1 other repo
Token cost
~519 tokens
SKILL.md length
192 words
Files
2
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Cache and refresh remote git repositories under ~/.cache/checkouts/<host/<org/<repo so future references can reuse a local copy.

  • Works in 5 steps: Parse the repo reference into… → Clone if missing. → Reuse existing checkout if present. → …
  • The user points you to a remote git repository as reference
  • SKILL.md covers Cache location, Command, Update strategy and Recommended workflow, plus 2 more sections
  • Runs Shell scripts from its folder; calls bash; reaches github.com

What it does

Librarian is an agent skill from mitsuhiko/agent-stuff. 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.

Its SKILL.md is about 520 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `checkout.sh`).

It sits in Development, covering Git workflow. It works with Git and GitHub. The repository describes itself as: These are commands I use with agents, mostly Claude. The licence is Apache-2.0.

When your agent uses it

  • The user points you to a remote git repository as reference
  • You encountered a remote git repo through other means

Example prompts

  • “/librarian”

Requirements

  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Parse the repo reference into host/org/repo.
  2. Clone 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.

What it can do on your machine

Read from SKILL.md and the folder at commit 0865c84. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Librarian loads about 519 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 192 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~519

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mitsuhiko/agent-stuff at commit 0865c84, republished under its Apache-2.0 licence (© mitsuhiko). 192 words, ~519 tokens.

Download SKILL.mdSave it as .claude/skills/librarian/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
librarian
description
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.

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

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

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. Clone 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.
  • Force immediate refresh with:
bash
bash checkout.sh <repo> --force-update --path-only
  1. Resolve repository path via checkout.sh --path-only.
  2. Use that path for searching, reading, and analysis.
  3. On later references to the same repo, 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.

© mitsuhiko, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/librarian of mitsuhiko/agent-stuff.

  • SKILL.md
  • checkout.sh

Open the folder on GitHubat commit 0865c84

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in mitsuhiko/agent-stuff, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Librarian next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Librarian compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Librarian this skillmitsuhiko/agent-stuff3.2k1 repos~519Automated safety check: PassApache-2.0
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Release Bumpjamiepine/voicebox57k—~1.1kAutomated safety check: PassMIT
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT
Create Pull Request with Work Item IDmakeplane/plane61k—~824Automated safety check: PassAGPL-3.0

Similar skills

  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Release Bump

    jamiepine/voicebox

    Ends a release cycle by moving the Unreleased changelog notes under a dated version heading, bumping version files with bumpversion and tagging the commit.

    57k GitHub stars~1.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    61k GitHub stars~824 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed

More from mitsuhiko/agent-stuff

All 16 skills in this repo
  • Anachb

    mitsuhiko/agent-stuff

    Austrian public transport (VOR AnachB) for all of Austria. An agent skill from mitsuhiko/agent-stuff.

    3.2k GitHub starsUsed in 2 repos~1.2k tokens
    Auto-check passed
  • Web Browser

    mitsuhiko/agent-stuff

    Automate and interact with web pages through Chrome or Chromium using the Chrome DevTools Protocol (CDP): navigate, click, fill forms, inspect content, take screenshots, and debug console or network…

    3.2k GitHub stars~1.5k tokensUpdated 12 days ago
    Auto-check: warnings
  • Google Workspace

    mitsuhiko/agent-stuff

    Access Google Workspace APIs (Drive, Docs, Calendar, Gmail, Sheets, Slides, Chat, People) via local helper scripts without MCP.

    3.2k GitHub stars~919 tokensUpdated 12 days ago
    Auto-check passed
  • Oebb Scotty

    mitsuhiko/agent-stuff

    Austrian rail travel planner (ÖBB Scotty). An agent skill from mitsuhiko/agent-stuff.

    3.2k GitHub stars~2.4k tokensUpdated 12 days ago
    Auto-check passed
  • Sentry

    mitsuhiko/agent-stuff

    Fetch and analyze Sentry issues, events, transactions, and logs.

    3.2k GitHub stars~1.8k tokensUpdated 12 days ago
    Auto-check passed
  • Tmux

    mitsuhiko/agent-stuff

    Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output.

    3.2k GitHub stars~1.4k tokensUpdated 12 days ago
    Auto-check passed

Works with

Categories

Questions about Librarian

What does Librarian do?

Cache and refresh remote git repositories under ~/.cache/checkouts/<host/<org/<repo so future references can reuse a local copy. Librarian is an agent skill from mitsuhiko/agent-stuff.cache/checkouts/<host/<org/<repo so future references can reuse a local copy.

When should I use Librarian?

Librarian fits situations like: the user points you to a remote git repository as reference; you encountered a remote git repo through other means.

How do I install Librarian in Claude Code?

Run `npx skills add mitsuhiko/agent-stuff --skill librarian -a claude-code`. Or copy the skill folder (skills/librarian in mitsuhiko/agent-stuff) into .claude/skills/librarian in your project. Claude Code loads it when a task matches its description.

How do I install Librarian in Codex?

Run `npx skills add mitsuhiko/agent-stuff --skill librarian -a codex`. Or copy the skill folder (skills/librarian in mitsuhiko/agent-stuff) into .agents/skills/librarian in your project. Codex loads it when a task matches its description.

Can I use Librarian in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mitsuhiko/agent-stuff --skill librarian -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/librarian, .gemini/skills/librarian, .github/skills/librarian and .opencode/skills/librarian in your project.

What does Librarian need to run?

Going by SKILL.md and its folder, Librarian needs a shell for the scripts in its folder and the command-line tools its instructions call (bash). Our summary lists: A Bash shell.

Does Librarian access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Librarian safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Librarian use?

Librarian is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Librarian use?

About 519 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Librarian?

Skills that share tags, products or a category with Librarian: Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Create Pull Request (cline/cline, 70k stars), Release Bump (jamiepine/voicebox, 57k stars) and Creating Description For Gh PR (redis/jedis, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Librarian?

mitsuhiko (a GitHub user) maintains it in mitsuhiko/agent-stuff, which has 3,179 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 27, 2026.

Source: mitsuhiko/agent-stuff on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.