Go release
LLM agent skills collection
npx -y skills add akhy/agent-skills --skill go-releaseAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Set up automated releases for Go CLI apps using GoReleaser, GitHub Actions, GHCR (Docker), and Homebrew tap. Use when the user wants to add release automation, Dockerfile, or Homebrew distribution to a Go project.
SKILL.md
4.8 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
Go Release Setup Skill
Sets up release infrastructure for Go CLI apps: GoReleaser config, Dockerfile, and GitHub Actions workflows.
Step 1 — Gather Project Info
Read go.mod to infer:
- Module path (e.g.
github.com/owner/repo) - Go version — use the version from the
godirective ingo.modif present; ifgo.moddoesn't exist or has nogodirective, fetch the current latest stable Go version fromhttps://go.dev/VERSION?m=textand use that - Binary name — check
cmd/subdirectories; if multiple, ask which one(s) to release; if absent, use the last segment of the module path
Derive <github-owner> and <github-repo> from the module path.
If any of the following cannot be inferred, ask the user:
- CGO required? — scan source files for
import "C"; if found, CGO = true, else CGO = false - App description — one-line description for the Homebrew formula and release header
- License — check
LICENSEfile; if absent, ask (default: MIT) - Distribution channels to enable (ask the user; suggest all as default):
github— GitHub Releases binary archives + checksums (always required)docker— Dockerfile + GHCR image push viadocker.ymlworkflowhomebrew— Homebrew formula pushed to<github-owner>/homebrew-taprepo
- Homebrew tap repo (homebrew only) — default
<github-owner>/homebrew-tap
Step 2 — Check What Already Exists
Before generating each file, check if it exists. Skip or ask to confirm overwrite:
Dockerfile.goreleaser.yaml.github/workflows/release.yml.github/workflows/docker.yml
Step 3 — Generate .goreleaser.yaml
Use assets/goreleaser.yaml as the template. Substitute all <placeholder> values. Then:
- Set
CGO_ENABLED=1and removewindowsfromgoosif CGO is required - Remove the
brewssection ifhomebrewis not enabled - Remove the Docker
**Docker:**block fromrelease.headerifdockeris not enabled - Remove the Homebrew
**Homebrew:**block fromrelease.headerifhomebrewis not enabled - Remove
TAP_GITHUB_TOKENfrom the env block inrelease.ymlifhomebrewis not enabled
Step 4 — Generate Dockerfile (only if docker channel enabled)
- No CGO: use
assets/Dockerfile.alpineas template - CGO required: use
assets/Dockerfile.debianas template
Substitute <go-version>, <module-path>, and <binary-name>. Adjust main path if the project doesn't use cmd/<binary-name> layout.
Step 5 — Generate GitHub Workflows
Create .github/workflows/ if it doesn't exist.
| Workflow | Source template | When to generate |
|---|---|---|
release.yml | assets/workflows/release.yml | Always (github channel) |
docker.yml | assets/workflows/docker.yml | Only if docker channel enabled |
Substitute <go-version> in each workflow. For release.yml, remove the TAP_GITHUB_TOKEN env line if homebrew is not enabled.
Note: CI workflows (tests, lint) are handled by the
go-ciskill. Only add them here if the user hasn't already set upgo-ci.
Step 6 — Optional: Create internal/version Package
If no version package exists and the project's ldflags reference internal/version, create internal/version/version.go:
package version
var (
Version = "dev"
GitCommit = "unknown"
BuildDate = "unknown"
)
Step 7 — Post-Setup Instructions
Tell the user:
-
GitHub Secrets required:
GITHUB_TOKEN— auto-provided by GitHub ActionsTAP_GITHUB_TOKEN(homebrew only) — GitHub PAT withreposcope for the tap repo
-
Homebrew tap repo (homebrew only) — create
<github-owner>/homebrew-tapwith aFormula/directory if it doesn't exist -
First release:
git tag v0.1.0 git push origin v0.1.0 -
Test locally (snapshot, no publish):
goreleaser release --snapshot --clean