finding-latest-versions
Skill6 starsChanged 9 days agoMITView on GitHub
Use when you need the newest release of a GitHub repo or the newest tag of a container image (Docker Hub, ghcr.io, quay.io, registry.k8s.io or any OCI registry) before you bump or pin a version, or the digest of an image tag. Also use when you are about to run gh release list, call releases/latest or do a registry token handshake by hand.
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adding-an-add-to-claude-buttonSkill
- bd-to-br-migrationSkill
- codex-plan-reviewSkill
- codex-reviewSkill
- debugging-kubernetes-rolloutsSkill
- debugging-nodejs-appsSkill
- de-sloppingSkill
- detect-overengineeringSkill
- evaluating-third-party-toolsSkill
- git-reconSkill
- humanizerSkill
- hyprland-luaSkill
- mining-claude-sessionsSkill
- minto-pyramidSkill
- nonstopSkill
- operating-frappe-on-kubernetesSkill
- presentation-blueprintSkill
- pr-fixSkill
- pr-landSkill
- prSkill
- watching-pr-bot-reviewsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Do not look versions up by hand.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Finding latest versions
latest-version (in this skill's bin/) prints the newest version of a GitHub repo or a container image. It sorts tags as versions, skips pre-releases unless you ask, and reads past the first page.
Do not look versions up by hand. GitHub's releases/latest picks by date, so a backport can win. Registries list tags in text order, a page at a time. So 1.9 comes after 1.10, and the newest can be on the last page.
| You need | Run |
| The newest release of a GitHub repo | latest-version cloudflare/cloudflared |
| The 3 newest tags of an image | latest-version docker.io/library/caddy -n 3 |
| A tag on any other registry | latest-version ghcr.io/project-zot/zot |
| The newest of one line | latest-version kubernetes/kubernetes --match '^v1\.31\.' |
| The newest variant of an image | latest-version caddy --match '-alpine$' |
| Pre-releases too | latest-version prometheus/prometheus --pre |
Tags with a prefix, such as jq-1.8.2 | latest-version jqlang/jq --match '^jq-(.+)$' |
| The digest, to pin an image | latest-version registry.k8s.io/pause --digest 3.10.2 |
| All fields, for a script | add --json |
With a gh login, GitHub calls send gh's token, else they use the public API (60 calls an hour). latest-version --help lists every flag.
Reading the output
The output is one tag per line, newest first, as the source spells it.
| Exit | Meaning | Do |
| 0 | found | use the first line |
| 1 | nothing matched | read stderr: it says what it set aside |
| 2 | network or API error | read stderr: a rate limit, a private image, an unknown repo, or a list it cannot read in full |
| 3 | usage error | correct the command |
--digest prints sha256:..., for a multi-platform image the digest of the index, which docker pull uses.
How tags sort:
1.10is newer than1.9. Avprefix does not count.- A suffix such as
-rc.1,-betaora1makes a pre-release, shown only with--pre. - Any other suffix (
-alpine,-slim,-1) makes a variant, shown only with--match. Release words (.Final,-lts) do not count as a suffix. - Tags that are not versions (
latest,main,sha-...) are set aside. - A one-number tag such as
2or20241105counts only with--match. 13.3and13.3.0are one version. The longer tag prints;--jsonlists the other underaliases.
Common mistakes
- A bare
OWNER/REPOalways means GitHub. For thegrafana/grafanaimage, writedocker.io/grafana/grafana. - A release tag and an image tag can differ:
v2.11.9on GitHub is2.11.9on Docker Hub. To bump an image, ask the registry, not GitHub. - A repo that stopped making GitHub releases answers with its last release. If the answer looks old, try
--tags. --match '^v?2\.'also lets in variants such as2.8.4-alpine. For plain versions only, anchor both ends:--match '^v?2\.[0-9.]+$'.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

