agentleFS
Smirnov-LabsSmirnov-Labs/claude-skills/skills/finding-latest-versions/SKILL.md

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.

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
  1. Very specific:

    Do not look versions up by hand.

    line 10

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 needRun
The newest release of a GitHub repolatest-version cloudflare/cloudflared
The 3 newest tags of an imagelatest-version docker.io/library/caddy -n 3
A tag on any other registrylatest-version ghcr.io/project-zot/zot
The newest of one linelatest-version kubernetes/kubernetes --match '^v1\.31\.'
The newest variant of an imagelatest-version caddy --match '-alpine$'
Pre-releases toolatest-version prometheus/prometheus --pre
Tags with a prefix, such as jq-1.8.2latest-version jqlang/jq --match '^jq-(.+)$'
The digest, to pin an imagelatest-version registry.k8s.io/pause --digest 3.10.2
All fields, for a scriptadd --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.

ExitMeaningDo
0founduse the first line
1nothing matchedread stderr: it says what it set aside
2network or API errorread stderr: a rate limit, a private image, an unknown repo, or a list it cannot read in full
3usage errorcorrect the command

--digest prints sha256:..., for a multi-platform image the digest of the index, which docker pull uses.

How tags sort:

  • 1.10 is newer than 1.9. A v prefix does not count.
  • A suffix such as -rc.1, -beta or a1 makes 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 2 or 20241105 counts only with --match.
  • 13.3 and 13.3.0 are one version. The longer tag prints; --json lists the other under aliases.

Common mistakes

  • A bare OWNER/REPO always means GitHub. For the grafana/grafana image, write docker.io/grafana/grafana.
  • A release tag and an image tag can differ: v2.11.9 on GitHub is 2.11.9 on 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 as 2.8.4-alpine. For plain versions only, anchor both ends: --match '^v?2\.[0-9.]+$'.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.