Agent skill

Cache GitHub Repo

by aehrc in aehrc/pathling

Clone and locally cache a pinned version of a GitHub repository for fast, deterministic access by other skills — for example a reference implementation consulted for spec cross-checking.

Apache-2.0Auto-check: notes

Install Cache GitHub Repo

skills CLI
$ npx skills add aehrc/pathling --skill cache-github-repo -a claude-code

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

GitHub CLI
$ gh skill install aehrc/pathling cache-github-repo --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/aehrc/pathling.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cache-github-repo .claude/skills/cache-github-repo && 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
cache-github-repo
GitHub stars
137
Token cost
~2k tokens
SKILL.md length
853 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Clone and locally cache a pinned version of a GitHub repository for fast, deterministic access by other skills — for example a reference implementation consulted for spec cross-checking.

  • Works in 3 steps: Resolve the project root (git rev-parse… → Entry missing → Entry present → let VERSION be the…
  • Phrases like cache this repo
  • SKILL.md covers Config file, Cache location, Mode: ensure [--unattended] and Mode: configure [--version ], plus 2 more sections
  • Calls git; reaches github.com

What it does

Cache GitHub Repo is an agent skill from aehrc/pathling. Clone and locally cache a pinned version of a GitHub repository for fast, deterministic access by other skills — for example a reference implementation consulted for spec cross-checking. Manages a tracked per-project config file mapping org/repo to a pinned version, and a version-keyed local cache shared across projects. Invoke directly to set or change a pin (configure org/repo [--version ref]), or let another skill delegate to it to make sure a pinned repo is available (ensure org/repo [--unattended]). Trigger…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with GitHub. The repository describes itself as: Tools that make it easier to use FHIR and clinical terminology within data analytics, built on Apache Spark. The licence is Apache-2.0.

When your agent uses it

  • Phrases like cache this repo
  • Pin a reference implementation
  • Configure the version of X to use
  • A skill needs a stable local copy of an external GitHub repository

Example prompts

  • “cache this repo”
  • “pin a reference implementation”
  • “configure the version of X to use”
  • “/cache-github-repo”

Requirements

  • Pre-approved tools (allowed-tools): Bash, AskUserQuestion

Workflow steps

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

  1. Resolve the project root (git rev-parse --show-toplevel, or $PWD if not inside a git repo) and
  2. Entry missing
  3. Entry present → let VERSION be the recorded value. Compute

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    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

Cache GitHub Repo loads about 2k tokens when it runs. Until then it costs about 181 tokens; SKILL.md has 853 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, AskUserQuestion

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 aehrc/pathling at commit 56a3b4a, republished under its Apache-2.0 licence (© aehrc). 853 words, ~1,978 tokens.

Download SKILL.mdSave it as .claude/skills/cache-github-repo/SKILL.md (or your agent's skills folder).
name
cache-github-repo
description
Clone and locally cache a pinned version of a GitHub repository for fast, deterministic access by other skills — for example a reference implementation consulted for spec cross-checking. Manages a tracked per-project config file mapping `org/repo` to a pinned version, and a version-keyed local cache shared across projects. Invoke directly to set or change a pin (`configure org/repo [--version ref]`), or let another skill delegate to it to make sure a pinned repo is available (`ensure org/repo [--unattended]`). Trigger on phrases like "cache this repo", "pin a reference implementation", "configure the version of X to use", or when a skill needs a stable local copy of an external GitHub repository.
allowed-tools
Bash, AskUserQuestion
argument-hint
<ensure|configure> <org/repo> [--version <ref>] [--unattended]

Cache a GitHub repo locally, pinned to a version

Keeps other skills from depending on ad hoc, machine-specific setup (a hand-made symlink, a path that only exists on one developer's machine) to reach reference material that lives in a GitHub repository. Owns two things:

  • a tracked, per-project config file recording which pinned version of which org/repo this project uses
  • a local, version-keyed cache of that repo, shared across every project, worktree, and clone on this machine

Scope is deliberately narrow: github.com repositories identified by org/repo, nothing else.

Config file

.claude/repo-cache.yaml at the project root (created on first configure). One line per pinned repo, key is the GitHub org/repo slug:

yaml
HL7/fhirpath.js: 3.16.4

The key doubles as the clone identifier (https://github.com/<org>/<repo>.git) — nothing else needs recording. Commit this file. It is what makes the pin reproducible across every contributor, clone, and CI run, rather than a personal, silent choice that could differ machine to machine.

Cache location

~/.cache/claude-skills/github-repo-cache/<org>/<repo>/<version>/

Shared across every project on this machine and keyed by version, so two projects pinning different versions of the same repo never conflict, and a version bump doesn't disturb whatever was cached for the old one.

Mode: ensure <org/repo> [--unattended]

The path other skills delegate to. Never asks a question when --unattended is passed — a dispatched subagent or an unattended pipeline has no one to answer it.

  1. Resolve the project root (git rev-parse --show-toplevel, or $PWD if not inside a git repo) and read .claude/repo-cache.yaml there. Look up <org/repo>.
  2. Entry missing:
    • --unattended literally passed as an argument to this invocation → fail immediately. Report: "<org/repo> has no configured version — run '/cache-github-repo configure <org/repo>' first" and stop. Do not guess a version, do not attempt to ask.
    • Otherwise → run the configure steps below for this repo, then continue. This includes when the current session has some general "auto mode"/"operate autonomously" disposition — that governs tool-permission friction, not whether a human can answer a question, and does not satisfy the --unattended condition above. Only the literal flag does.
  3. Entry present → let VERSION be the recorded value. Compute CACHE_DIR=~/.cache/claude-skills/github-repo-cache/<org>/<repo>/<version>.
    • $CACHE_DIR/.git exists → already cached. Report $CACHE_DIR and stop.
    • Missing → clone it (see "Cloning a pinned ref" below), then report $CACHE_DIR.

Mode: configure <org/repo> [--version <ref>]

The explicit, user-invoked path — and also what ensure falls into automatically when attended and the entry is missing.

  1. If --version <ref> was given, use it as VERSION and skip to step 3.

  2. Otherwise, find the candidates:

    bash
    git ls-remote --tags --sort=-v:refname "https://github.com/<org>/<repo>.git" | head -5

    Present the most recent tag as "latest stable" and main as the alternative. You MUST NOT pick one and write the config yourself, even under an "auto mode"/"proceed autonomously" disposition — wait for the user's choice (e.g. via AskUserQuestion) first. If the network call fails, say so and ask the user to supply a ref directly instead of guessing.

    Whichever is chosen, record a reference that stays fixed across future runs:

    • A tag → record the tag name. This is a deliberate trade-off, not a claim that the tag can never move: a maintainer could in principle recreate or reassign one, but for a maintained upstream release tag that's atypical, and 5.1.0 is far more useful to a reader of .claude/repo-cache.yaml than a bare SHA. Readability wins here.
    • main (or any branch) → resolve it to its current commit SHA (git ls-remote https://github.com/<org>/<repo>.git main) and record the SHA, not the branch name. A branch moves on every commit by design — a far more frequent failure mode than a maintained tag being reassigned — so recording the branch name would silently re-resolve to a different commit on every future run, defeating the point of pinning.
  3. Write <org/repo>: <VERSION> into .claude/repo-cache.yaml at the project root, creating the file if it doesn't exist and updating the entry in place if the key is already present.

  4. Clone it immediately (see below) so the project is usable right away rather than deferring the fetch to the next ensure call.

  5. Report the recorded version and the local cache path.

Show full SKILL.md (199 more words)Show less

Cloning a pinned ref

bash
CACHE_DIR=~/.cache/claude-skills/github-repo-cache/<org>/<repo>/<version>
if [ ! -d "$CACHE_DIR/.git" ]; then
  TMP=$(mktemp -d)
  if ! git clone --quiet --depth 1 --branch "<version>" \
        "https://github.com/<org>/<repo>.git" "$TMP" 2>/dev/null; then
    # <version> isn't a branch or tag name (e.g. a SHA resolved from `main`) — fetch it directly.
    # Every step is chained, so a failure anywhere leaves nothing behind at $CACHE_DIR.
    if ! { git init --quiet "$TMP" \
        && git -C "$TMP" remote add origin "https://github.com/<org>/<repo>.git" \
        && git -C "$TMP" fetch --quiet --depth 1 origin "<version>" \
        && git -C "$TMP" checkout --quiet FETCH_HEAD; }; then
      rm -rf "$TMP"
      echo "Could not retrieve <org>/<repo> at <version>" >&2
      exit 1
    fi
  fi
  mkdir -p "$(dirname "$CACHE_DIR")"
  if [ ! -d "$CACHE_DIR/.git" ]; then
    mv "$TMP" "$CACHE_DIR"
  else
    rm -rf "$TMP"   # another caller already populated it first — discard the redundant clone
  fi
fi

Each attempt clones into its own mktemp -d, so two concurrent ensure calls never race over a shared temp path. The final move only proceeds if nobody has already populated $CACHE_DIR, so this isn't a fully atomic claim against another writer finishing in between — but the failure mode is at worst an occasional wasted clone, never a corrupted destination.

If the clone fails outright (network unreachable, ref doesn't exist upstream), report the error clearly and stop. Do not leave a partial $CACHE_DIR behind — an aborted fallback that still got as far as git init would otherwise install a .git directory that every later ensure call reads as a populated cache, silently serving an empty repository from then on.

What this skill does not do

  • Does not track "latest" live. Once a version is recorded, it stays pinned until someone runs configure again — nothing re-resolves it automatically or on a schedule.
  • Does not assume a specific consumer. Any skill needing a stable local copy of a GitHub repo can delegate to ensure org/repo, not just one reference implementation.
  • Does not clone anything not hosted on github.com — the key format and clone-URL derivation both assume GitHub specifically.

© aehrc, 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

Just SKILL.md in .claude/skills/cache-github-repo of aehrc/pathling.

Open the folder on GitHubat commit 56a3b4a

Compare with similar skills

Cache GitHub Repo 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.

Cache GitHub Repo compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cache GitHub Repo this skillaehrc/pathling137—~2kAutomated safety check: NotesApache-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Diagnosing Superpowers Sessionsobra/superpowers296k3 repos~1.7kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow83k5 repos~1.3kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    296k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    83k GitHub starsUsed in 5 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed

More from aehrc/pathling

All 25 skills in this repo
  • Fhir API

    aehrc/pathling

    Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification.

    137 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Fhir Bulk Data

    aehrc/pathling

    Expert guidance for implementing FHIR Bulk Data Access (Flat FHIR) following the HL7 specification.

    137 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Databricks CLI

    aehrc/pathling

    Expert guidance for using the Databricks CLI to manage Databricks workspaces, clusters, jobs, pipelines, Unity Catalog, SQL warehouses, serving endpoints, secrets, bundles, and all other Databricks…

    137 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Fhir Search Spec

    aehrc/pathling

    FHIR RESTful search specification expert with access to the official HL7 search specification text and the formal SearchParameter registry.

    137 GitHub stars~649 tokensUpdated today
    Auto-check passed
  • Design and generate comprehensive FHIRPath test suites using input domain partitioning and Pathling's DSL test framework.

    137 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Hapi Fhir Server

    aehrc/pathling

    Expert guidance for implementing FHIR servers using HAPI FHIR Plain Server framework.

    137 GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Works with

Questions about Cache GitHub Repo

What does Cache GitHub Repo do?

Clone and locally cache a pinned version of a GitHub repository for fast, deterministic access by other skills — for example a reference implementation consulted for spec cross-checking. Cache GitHub Repo is an agent skill from aehrc/pathling. Clone and locally cache a pinned version of a GitHub repository for fast, deterministic access by other skills — for example a reference implementation consulted for spec cross-checking.

When should I use Cache GitHub Repo?

Cache GitHub Repo fits situations like: phrases like cache this repo; pin a reference implementation; configure the version of X to use; A skill needs a stable local copy of an external GitHub repository.

How do I install Cache GitHub Repo in Claude Code?

Run `npx skills add aehrc/pathling --skill cache-github-repo -a claude-code`. Or copy the skill folder (.claude/skills/cache-github-repo in aehrc/pathling) into .claude/skills/cache-github-repo in your project. Claude Code loads it when a task matches its description.

How do I install Cache GitHub Repo in Codex?

Run `npx skills add aehrc/pathling --skill cache-github-repo -a codex`. Or copy the skill folder (.claude/skills/cache-github-repo in aehrc/pathling) into .agents/skills/cache-github-repo in your project. Codex loads it when a task matches its description.

Can I use Cache GitHub Repo 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 aehrc/pathling --skill cache-github-repo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cache-github-repo, .gemini/skills/cache-github-repo, .github/skills/cache-github-repo and .opencode/skills/cache-github-repo in your project.

What does Cache GitHub Repo need to run?

Going by SKILL.md and its folder, Cache GitHub Repo needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Bash, AskUserQuestion.

Does Cache GitHub Repo 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 Cache GitHub Repo safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Cache GitHub Repo use?

Cache GitHub Repo 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 Cache GitHub Repo use?

About 2k tokens (SKILL.md is roughly 7.9k 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 Cache GitHub Repo?

Skills that share tags, products or a category with Cache GitHub Repo: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Diagnosing Superpowers Sessions (obra/superpowers, 296k stars), GitHub Deep Research (bytedance/deer-flow, 83k stars) and Greploop (onyx-dot-app/onyx, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cache GitHub Repo?

aehrc (a GitHub organization) maintains it in aehrc/pathling, which has 137 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 7, 2026.

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