Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

comparing-go-release-binaries

/comparing-go-release-binaries

Porównuje informacje o budowaniu dwóch plików binarnych Go, wskazując zmiany zależności, sum kontrolnych, wersji narzędzi i czystości drzewa.

Repozytorium
buildinfodiff ↗
Licencja
MIT
Ostatnia zmiana repozytorium
02.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 02.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Porównuje informacje o budowaniu dwóch plików binarnych Go, wskazując zmiany zależności, sum kontrolnych, wersji narzędzi i czystości drzewa.

Oryginalny opis (EN)

Compares the build information Go embeds in two binaries, such as the release running in production and the one about to replace it, and reports dependency upgrades and downgrades, changed checksums, new replace directives, the Go toolchain, build tags, CGO, -trimpath, ldflags, DefaultGODEBUG, CPU level, and whether each was built from a clean, committed tree. Use when the user asks what changed between two Go releases or builds, whether a release binary was built from a dirty tree or a local fork, why a new build behaves differently with the same code, what a hotfix build contains, or shares

Jak działa

  1. Get the two inputs
  2. Run the tool
  3. Explain each finding
  4. Report
  5. Don't
Sekcje z nagłówków SKILL.md, w oryginale · 48 linii, 697 słów
Podgląd SKILL.md
---
name: comparing-go-release-binaries
description: Compares the build information Go embeds in two binaries, such as the release running in production and the one about to replace it, and reports dependency upgrades and downgrades, changed checksums, new replace directives, the Go toolchain, build tags, CGO, -trimpath, ldflags, DefaultGODEBUG, CPU level, and whether each was built from a clean, committed tree. Use when the user asks what changed between two Go releases or builds, whether a release binary was built from a dirty tree or a local fork, why a new build behaves differently with the same code, what a hotfix build contains, or shares two `go version -m` outputs.
---

# Comparing Go release binaries

Every Go binary built with modules carries its own build information: the Go version, every linked module with its version and checksum, replace directives, build flags and the VCS commit. Two builds of the "same" code can differ in ways code review never sees. The bundled tool compares two of them and lists what changed, with the changes that need a person first. It needs Go 1.22 or newer. It reads files and never uses the network.

## Get the two inputs

The tool reads Go executables (ELF, Mach-O, PE) directly, or saved output of `go version -m FILE` or `go version -m -json FILE`.

1. **Base** is the build you trust, usually the one running now. **Head** replaces it.
2. If the user has both binaries, use them. A binary is better than text, because a cut-off binary is always caught.
3. If only text is available, for example from a container or a CI log, save the whole output of `go version -m /path/to/binary` for one binary per file.
4. To compare two revisions of the repository, build each with the project's own release command (look in the `Makefile`, `.goreleaser.yaml` or CI workflow), in a separate worktree, for example `git worktree add /tmp/base v1.4.0`. Use the same command and environment for both, or the report shows your build differences instead of the code's.
5. Ask before pulling images, copying files out of running containers or clusters, or downloading release assets.

## Run the tool

    go run "${CLAUDE_PLUGIN_ROOT}/scripts/buildinfodiff.go" BASE HEAD

- `--fail` exits 1 when a change needs a look, for CI.
- `--json` gives the full result, including every dependency and setting of each side.
- Exit code 2 means an input can't be trusted: empty, not build information, cut off, or more than one binary in one file. Report the message and get a complete input. Never present the result of a run that ended with exit code 2 as a comparison.
- `--trust-no-vcs` accepts `go version -m` text from a local build that has no VCS lines. Use it only after checking with the user that the build really had no VCS stamp, for example because it used `-buildvcs=false`. Prefer passing the binary.

## Explain each finding

For each item under "needs a look", say what it means for this project and what to check:

1. **Uncommitted changes (vcs.modified=true) or no VCS stamp:** the commit doesn't identify the code. Ask where the binary was built and whether it should go out.
2. **Downgrades, changed checksums, new replace directives:** look at `go.mod` and `go.sum` at head's commit. A local directory replacement means code that no version pins. A changed checksum for the same version should never happen with the public module proxy, so treat it as a supply chain question.
3. **DefaultGODEBUG:** runtime behavior changed without a code change, usually because the `go` line in `go.mod` moved. Look each key up at https://go.dev/doc/godebug and say which ones this program could hit.
4. **CGO_ENABLED, tags, -trimpath, other linker flags, -race, -gcflags, CPU level:** compare with the project's release command and ask whether the change was intended. A cgo binary on Linux usually needs libc at run time.
5. **Toolchain downgrade, older commit, lower module version:** this may be a rollback or the arguments in the wrong order.

Then summarize the informational part: the Go toolchain change, the number of upgraded, added and removed dependencies, and any `-X` version stamps.

## Report

1. Lead with the findings that need a look, each with what to check.
2. Then the dependency and toolchain changes, grouped. Point out major version jumps and dependencies that are new to the program.
3. Say what the comparison can't show: it compares build metadata, not code, so a code change inside the same module version, or in the main module itself, doesn't appear.

## Don't

- Don't say two builds are the same because the report is short. Changes in the main module's own code don't show up here.
- Don't paste the full `go version -m` output into the conversation when the report is enough.
- Don't edit `go.mod`, rebuild or redeploy unless the user asks.

Wersje

W bazie nie ma innych skilli o nazwie comparing-go-release-binaries.

Migawka bazy z 13.11.2026 · wersja paczki 3412f83875d6 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100go-binary-size
    Zmniejsza rozmiar skompilowanych binariów Go i obrazów kontenerów: flagi linkera, budżet inliningu, CGO i tagi buildów, osadzone zasoby, waga zależności i pomiar, co kosztuje bajty.
  • 100explaining-go-build-cache-misses
    Wyjaśnia, dlaczego przebieg Go build, go test lub go vet ominął cache GOCACHE, porównując klucze z dwóch uruchomień.
  • 100go-containers
    Optymalizuje kontenery z aplikacjami w Go: obrazy scratch i distroless, statyczne binaria, CGO, ldflags i trimpath, zmniejszając obraz z 846 MB do 2,5 MB.
  • 100validate-binaries
    Sprawdza pliki wykonywalne pod kątem instrukcji procesora, które powodują awarie na starszych maszynach.
  • 90go-stinger
    Wspiera pracę z Go: moduły, toolchainy, vendoring, zamrożone forki, ABI wtyczek cgo .so, układ projektu i buildy, w tym go.mod, dyrektywy replace i awarie wtyczek.
  • 90checking-go-builds-without-cgo
    Wykrywa pakiety Go, które zmieniają się przy budowaniu z CGO_ENABLED=0, dla każdego celu GOOS i GOARCH, i wskazuje zależności z atrapami.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.