image-cache
/image-cache
Shares Docker build layers and heavy images between cloud sessions through the owner's ghcr.io. Use when a repo's image build is slow on cloud, when a session pulls or pushes ghcr.io images, or when a heavy tool image should be prebuilt once.
- Author
- Paradiddle131 ↗
- Repository
- loadout ↗
- Licence
- MIT
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Shares Docker build layers and heavy images between cloud sessions through the owner's ghcr.io. Use when a repo's image build is slow on cloud, when a session pulls or pushes ghcr.io images, or when a heavy tool image should be prebuilt once.
Triggers from the description
Original author description
Shares Docker build layers and heavy images between cloud sessions through the owner's ghcr.io. Use when a repo's image build is slow on cloud, when a session pulls or pushes ghcr.io images, or when a heavy tool image should be prebuilt once.
How it works
- Access
- Which shape
- Reference
SKILL.md preview
---
name: image-cache
description: Shares Docker build layers and heavy images between cloud sessions through the owner's ghcr.io. Use when a repo's image build is slow on cloud, when a session pulls or pushes ghcr.io images, or when a heavy tool image should be prebuilt once.
---
# Image cache on ghcr.io
A cloud session starts with an empty Docker cache, so every image builds from scratch.
The owner's ghcr.io namespace is the shared cache: one session writes it, the next reads it.
`<owner>` and `<repo>` below are the GitHub owner and name of the repo being built, lower-cased (`git remote get-url origin`).
## Access
The egress proxy logs every ghcr.io request in as the owner (a token with `read:packages` and `write:packages`, injected as `Authorization: Bearer <base64 token>`).
Pull and push with plain `docker`; `GITHUB_TOKEN` and `GH_TOKEN` hold placeholders, so a `docker login` would only send the wrong credential.
Check it first: `curl -s -o /dev/null -w '%{http_code}' https://ghcr.io/v2/` answers `200`.
A `403` with `invalid token` means the environment's ghcr.io secret is wrong (a raw token instead of its base64): a `You:` item for the owner, not something to work around.
## Which shape
- **Layer cache** (the default, for an image the repo builds): BuildKit reads and writes the cache beside the build, so nobody pushes by hand and a changed input simply misses.
Add to the repo's single build entry point, per image:
`--cache-from type=registry,ref=ghcr.io/<owner>/<repo>/<image>:buildcache --cache-to type=registry,ref=ghcr.io/<owner>/<repo>/<image>:buildcache,mode=max,ignore-error=true`.
`mode=max` keeps the builder stages of a multi-stage build; `ignore-error=true` keeps a failed cache write from failing the build.
Turn it on by default where the proxy is (cloud) and leave it opt-in on a machine without it, which needs a `docker login ghcr.io` first.
Give each image its own cache name: two images on one name overwrite each other's cache.
- **Prebuilt image** (a heavy tool or base the session runs but does not build): build it once, push an immutable version tag, and have consumers name the tag and its digest.
A Dockerfile change means a new version tag, pushed from the session that made the change; an existing tag is never pushed over.
Cache what takes minutes: a build over a minute, or a pull every session repeats.
A cache write uploads every new layer, so a build that takes seconds gains nothing; a warm cache typically cuts a multi-image rebuild to a fraction of its cold time.
## Reference
- ghcr.io's billing terms for container storage and bandwidth are on [GitHub Packages billing](https://docs.github.com/en/billing/concepts/product-billing/github-packages); read them before caching tens of GB.
- New packages are private and belong to the owner's account; a repo-scoped name (`<repo>/<image>`) keeps them grouped.
- Builds that reach PyPI or npm also need the proxy's CA inside the build (cloud `CLAUDE.md`, Containers); the cache does not replace it.
Versions
The database has no other skills named image-cache.
Database snapshot: 13.11.2026 · package version bf52701f8ec6 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100find-docker-image
Find existing Docker image tags on GHCR for Hyperlane agent, monorepo, or node service images. Use when the user wants to find a recent image, look up an image for a branch or commit, or check what's currently deployed. - 100deploy
This skill should be used when deploying containerized applications to remote servers. It builds Docker images, pushes to GHCR, and deploys via SSH with health verification. - 100github-actions
GitHub Actions runs CI/CD pipelines defined as YAML workflows inside a GitHub repository. Use when someone asks to "set up CI", "add a GitHub Actions workflow", "run tests on every pull request", "cache dependencies", "build a matrix", "deploy from Actions", "push a Docker image… - 100docker-build-deploy
Use when containerizing a Node.js app and setting up GitHub Actions CI/CD to build, push to GHCR, and deploy via SSH. Multi-stage build, non-root user, caching. - 100render-docker
在 Render 上构建并部署 Docker 容器——Dockerfile、多阶段构建、Blueprint 的 Docker 字段、私有 registry、层缓存及平台约束。当用户提到 Docker、Dockerfile、容器镜像、多阶段构建、容器 registry、GHCR、ECR、BuildKit、dockerContext、runtime docker 或 image,或要优化 Render 上的 Docker 构建时使用。 - 100render-docker
Builds and deploys Docker containers on Render—Dockerfiles, multi-stage builds, Blueprint Docker fields, private registries, layer caching, and platform constraints. Use when the user mentions Docker, Dockerfile, container images, multi-stage builds, container registry, GHCR,…