Add GoReleaser configuration and a GitHub Actions release workflow to an existing Go CLI project with Homebrew tap publishing. Use when the user says "add goreleaser", "set up goreleaser", "add Homebrew tap publishing", "publish to Homebrew", "set up release workflow", "add release automation for Go", or wants a Go CLI to ship signed release artifacts and a Homebrew cask. Detects shell completions, man-page generation, and macOS-only constraints, then conditionally tailors the GoReleaser config. Pairs with set-up-installers (alternative non-GoReleaser installer paths) and the release skill (cutting tagged releases).
How this skill is triggered — by the user, by Claude, or both
Slash command
/add-goreleaser-homebrew:add-goreleaser-homebrewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Add GoReleaser configuration and a GitHub Actions release workflow to an existing Go CLI project with Homebrew tap publishing.
Add GoReleaser configuration and a GitHub Actions release workflow to an existing Go CLI project with Homebrew tap publishing.
Confirm the current directory is a Go CLI project:
go.mod exists (required; abort if missing)go.mod to extract the module path (needed for ldflags and URLs).goreleaser.yml or .goreleaser.yaml; if present, warn and ask whether to overwrite or abort.github/workflows/release.yml; if present, warn and ask whether to overwrite or abortDetect the user's GitHub username for use in templates:
gh api user -q .login
If the command fails or produces no output, ask the user to provide their GitHub username. Use it wherever templates reference GITHUB-USERNAME.
Collect the following, inferring from existing files where possible:
Project name: determine in this precedence order:
BINARY/TOOL_BIN variable or the target passed to go build -o), use that name.go.mod.git remote get-url origin: strip any trailing .git from the URL and take the last path segment. If the command exits non-zero, returns empty output, or the URL cannot be parsed into a repo name, treat this as "no remote" and continue to step 4.Do not derive the project name from the directory or branch name, which are often misleading.
Short description: check the README for a one-line description; if not found, ask the user
If the user already provided some or all of these in their initial request, do not re-ask.
Check for three conditional features. For each, use the detection steps described in ./references/conditional-features.md:
Shell completions:
cmd/completion.gogo run . completion --helpMan page generation:
cmd/man.gocobra/doc or mango importsgo run . man --helpmacOS-only constraints:
//go:build darwin build constraintsGOOS=darwinPresent all detected features to the user and let them confirm or override before proceeding.
Find where the version variable is declared:
var version in Go files (commonly in main.go or cmd/root.go)main.go or package main, use -X main.version={{.Version}}cmd package, use -X MODULE-PATH/cmd.version={{.Version}}-X main.version={{.Version}} and note that the user should add a var version string declarationCheck where func main() is defined:
main.go exists in the repository root, use main: .main.go exists in a subdirectory (e.g., cmd/PROJECT-NAME/main.go), use main: ./cmd/PROJECT-NAMEmain: .Read ./references/goreleaser-base.md for the base GoReleaser template and create .goreleaser.yml from it:
PROJECT-NAME, PROJECT-DESCRIPTION, and GITHUB-USERNAME with the gathered values-X path based on step 5main path based on step 6./references/conditional-features.md:
before.hooks, include in archives.files, and set the completions: fieldbefore.hooks, archive files section, and set the manpages: fieldgoos/goarch, remove Windows format override./references/conditional-features.mdRead ./references/release-workflow.md for the release workflow template and create .github/workflows/release.yml from it.
runs-on: macos-latest)runs-on: ubuntu-latest)Create the .github/workflows/ directory if it does not exist.
If a Makefile exists in the project root:
release-dry-run target already exists./references/makefile-targets.mdrelease-dry-run to the .PHONY declarationIf no Makefile exists, skip this step.
If goreleaser is installed locally, validate the generated config:
goreleaser check
If the check fails, review the error and fix the configuration.
If goreleaser is not installed, skip validation and note that the user can install it with brew install goreleaser to validate locally.
The release workflow requires a HOMEBREW_TAP_TOKEN repository secret to publish Homebrew casks. Read ./references/homebrew-tap-token.md for the full setup steps.
Ask the user whether they want to set up the token now or defer it to later. If they defer, note in the summary that the token must be configured before the first release.
Print a summary of what was created and modified:
git tag v0.1.0 && git push origin v0.1.0goreleaser release --snapshot --clean (or make release-dry-run if the Makefile was updated)HOMEBREW_TAP_TOKEN setup was deferred in step 11: remind the user to add it as a repository secret before the first release (see ./references/homebrew-tap-token.md)go.mod does not exist, abort with a message that this skill requires an existing Go project.goreleaser.yml already exists, ask before overwriting.github/workflows/release.yml already exists, ask before overwritinggoreleaser check fails, show the error and attempt to fix the configurationgo.mod does not follow the github.com/USER/REPO pattern, ask the user for the homepage URLvar version string to main.go./references/goreleaser-base.md -- base .goreleaser.yml template./references/release-workflow.md -- .github/workflows/release.yml./references/makefile-targets.md -- release-dry-run Makefile snippet./references/conditional-features.md -- completions, man pages, and macOS-only modifications./references/homebrew-tap-token.md -- HOMEBREW_TAP_TOKEN repository-secret setup./references/migration-guide.md -- migrating from older GoReleaser configurationscboone/gh-actions SHAs before scaffoldingThe cboone/gh-actions reusable-workflow refs in this skill's templates are SHA-pinned with a # vX.Y.Z comment that was current when the template was authored. New releases of cboone/gh-actions rot those SHAs. Before emitting a workflow into a user's repo, refresh both the SHA and the comment to current latest:
TAG="$(gh release view --repo cboone/gh-actions --json tagName --jq '.tagName')"
SHA="$(gh api "repos/cboone/gh-actions/commits/${TAG}" --jq '.sha')"
echo "${SHA} # ${TAG}"
Replace each cboone/gh-actions/.../<workflow>.yml@<old-sha> # <old-tag> in the emitted workflow with the new SHA and tag. Dependabot in the user's repo keeps them in sync afterwards.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub cboone/agent-harness-plugins --plugin add-goreleaser-homebrew