Agent Skill
2/7/2026gh-brew-tap
Create or update personal Homebrew taps and formulae from GitHub Releases that publish pre-built tar.gz executable binaries (language-agnostic). Use when you need to inspect releases with gh CLI, scaffold a tap with brew CLI, and generate multi-arch macOS/Linux formulae that cover all architectures present in release assets.
N
neodejack
1GitHub Stars
1Views
npx skills add neodejack/skills
SKILL.md
| Name | gh-brew-tap |
| Description | Create or update personal Homebrew taps and formulae from GitHub Releases that publish pre-built tar.gz executable binaries (language-agnostic). Use when you need to inspect releases with gh CLI, scaffold a tap with brew CLI, and generate multi-arch macOS/Linux formulae that cover all architectures present in release assets. |
name: gh-brew-tap description: Create or update personal Homebrew taps and formulae from GitHub Releases that publish pre-built tar.gz executable binaries (language-agnostic). Use when you need to inspect releases with gh CLI, scaffold a tap with brew CLI, and generate multi-arch macOS/Linux formulae that cover all architectures present in release assets.
GitHub Release -> Homebrew Tap
Quick workflow
- If user hasn't provided The app repo location (local path or GitHub URL) and The Homebrew tap repo location if it exists (local path or GitHub URL). Start by telling the user two assumptions: (a) the app repo on GitHub has pre-built releases, and (b) after they provide the app repo URL or local path, you will verify this with
ghand abort if it is not true. Then ask the user for:- The app repo location (local path or GitHub URL).
- The Homebrew tap repo location if it exists (local path or GitHub URL).
- Resolve the app repo to an OWNER/REPO:
- If given a GitHub URL, parse OWNER/REPO from it.
- If given a local path, use
git remote get-url originorgh repo view --json nameWithOwner -q .nameWithOwnerfrom that directory.
- Verify the pre-built release assumption: use
gh release list -R OWNER/REPO, thengh release viewto confirm at least one release has.tar.gzbinary assets (not just source tarballs). If not, abort and ask the user to publish pre-built releases first. - Find similar formulae in Homebrew for conventions: set
HOMEBREW_NO_INSTALL_FROM_API=1, taphomebrew/core, and browse comparable formulae (see references/gh-brew-commands.md). - Identify the target repo and release tag. Prefer an explicit tag; otherwise use the latest release.
- Use
ghto list release assets and collect all.tar.gzbinaries. Keep every OS/arch present. - For each asset, download and compute
sha256, then inspect the archive to confirm the binary name/path. - If the tap repo doesn't exist yet, create it and push to GitHub (see references/gh-brew-commands.md). If the user only provided a GitHub URL, clone it locally before editing.
- Generate a formula template from
assets/formula.rb.tmpl, fill in the URLs and checksums per OS/arch, and aligninstallwith the archive contents. Usebrew createonly as a starting point if helpful. Use the Formula Cookbook, similar formulae, and upstream docs as references if needed (language-specific docs only when applicable). - Write a meaningful
test doblock for the formula. - Run
brew install --build-from-source <formula>to confirm the formula installs cleanly; fix any errors and retry. - Run
brew audit --strict --new --online <formula>andbrew test <formula>to ensure the formula passes audits and tests. - Use git to commit and push the new formula to the tap repo remote.
Use these references
- OS/arch mapping and formula patterns:
references/arch-mapping.md - Recommended CLI commands and JSON fields:
references/gh-brew-commands.md
Output expectations
- Support every architecture present in the release assets (no silent omissions).
- If only one asset exists, use a single
url/sha256. If multiple assets exist, useon_macos/on_linuxblocks andHardware::CPU.*branches. - Keep the formula language-agnostic; only the tar.gz binaries matter.
- Prefer direct GitHub release asset URLs (not source tarballs).
Notes
- Do not assume asset naming; match by inspecting asset names and archive contents.
- Use explicit dates/tags in communication when the user refers to “latest.”
- If stuck, ask for help with concrete details about what you tried and what failed.
- If instructions in this skill conflict with repo standards, ask before proceeding.
Skills Info
Original Name:gh-brew-tapAuthor:neodejack
Download