Agent skill

homebrew-formula-updater

Update Homebrew formula files with latest GitHub release URLs and SHA256 checksums. This skill should be used when the user wants to update a Homebrew tap formula (.rb file) with a new version from a GitHub release. Triggers on phrases like "update formula", "update homebrew", "new release", "bump version", or when pointing to a .rb formula file that needs version updates.

Stars 3
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/asteroid-belt/skills/tree/main/skills/homebrew-formula-updater

Metadata

Additional technical details for this skill

group
automation
category
packaging
difficulty
beginner
step count
3

SKILL.md

Homebrew Formula Updater

Overview

This skill automates updating Homebrew formula files with the latest release information from GitHub repositories. It fetches the newest release tag, downloads release assets to compute SHA256 checksums, and updates the formula file with new URLs and hashes.

When to Use

  • Updating a Homebrew formula after a new release is published
  • Refreshing SHA256 checksums for release assets
  • Bumping version numbers in formula files
  • Syncing a homebrew-tap repository with upstream releases

When NOT to Use

  • Formulas that build from source (no prebuilt release assets)
  • Formulas with non-standard asset naming conventions (not <repo>-<tag>-<platform>.tar.gz)
  • Releases hosted outside GitHub (e.g., GitLab, self-hosted)
  • Formulas requiring manual patching or complex post-download processing
  • Creating new formulas from scratch (this skill only updates existing formulas)

Workflow

Step 1: Identify the Formula and Repository

Determine the following from the user's request or by examining the formula file:

  1. Formula file path - The .rb file to update (e.g., skulto.rb)
  2. GitHub repository - The source repo in owner/repo format (e.g., asteroid-belt/skulto)

The repository can often be inferred from the homepage or url fields in the formula.

Step 2: Run the Update Script

Execute the bundled Python script to fetch the latest release and update the formula:

bash
python3 <skill-path>/scripts/update_formula.py <github_repo> <formula_file>

Example:

bash
python3 scripts/update_formula.py asteroid-belt/skulto skulto.rb

The script will:

  1. Query the GitHub API for the latest release tag
  2. Download each platform-specific asset (darwin-amd64, darwin-arm64, linux-amd64, linux-arm64)
  3. Compute SHA256 checksums for each asset
  4. Update the formula file with new version, URLs, and checksums
  5. Create a backup of the original file (.bak extension)

Step 3: Verify Changes

After the script completes:

  1. Review the updated formula file to ensure changes are correct
  2. Optionally run brew audit --strict <formula> to validate the formula syntax
  3. Test installation with brew install --build-from-source <formula>

Dry Run Mode

To preview changes without modifying the formula:

bash
python3 <skill-path>/scripts/update_formula.py <github_repo> <formula_file> --dry-run

Expected Formula Structure

The script expects formulas with platform-specific blocks like:

ruby
on_macos do
  if Hardware::CPU.intel?
    url "https://github.com/owner/repo/releases/download/vX.Y.Z/name-vX.Y.Z-darwin-amd64.tar.gz"
    sha256 "..."
  elsif Hardware::CPU.arm?
    url "https://github.com/owner/repo/releases/download/vX.Y.Z/name-vX.Y.Z-darwin-arm64.tar.gz"
    sha256 "..."
  end
end

on_linux do
  if Hardware::CPU.intel?
    url "https://github.com/owner/repo/releases/download/vX.Y.Z/name-vX.Y.Z-linux-amd64.tar.gz"
    sha256 "..."
  elsif Hardware::CPU.arm?
    url "https://github.com/owner/repo/releases/download/vX.Y.Z/name-vX.Y.Z-linux-arm64.tar.gz"
    sha256 "..."
  end
end

Asset Naming Convention

The script expects release assets named:

<repo-name>-<tag>-<platform>.tar.gz

Where <platform> is one of: darwin-amd64, darwin-arm64, linux-amd64, linux-arm64

Quality Checklist

Before completing the update:

  • Verified the GitHub repository has the expected release asset naming convention
  • Ran with --dry-run first to preview changes
  • Reviewed the updated formula for correctness
  • Backup file (.bak) preserved in case rollback is needed
  • Optionally ran brew audit --strict <formula> to validate syntax
  • Optionally tested with brew install --build-from-source <formula>

Resources

scripts/

  • update_formula.py - Python script that fetches the latest release and updates formula files (requires Python 3.8+)

Expand your agent's capabilities with these related and highly-rated skills.

asteroid-belt/skills

release-readiness-checklist

Interactive release readiness checklist with semantic versioning guidance. Use when preparing a software release, cutting a version, deploying to production, or when user asks about release preparation. Triggers on phrases like "prepare release", "release checklist", "ready to release", "cut a version", "version bump", or "/release-readiness-checklist".

3 0
Explore
asteroid-belt/skills

agentsmd-generator

Generate project-level AGENTS.md guides that capture conventions, workflows, and required follow-up tasks. Use when a repository needs clear agent onboarding covering structure, tooling, testing, task flow, README expectations, and conventional commit summaries.

3 0
Explore
asteroid-belt/skills

teach

Transforms technical documents into rigorous learning journeys with collegiate-level mastery requirements. Uses Bloom's taxonomy progression, 80%+ mastery thresholds, and multi-level verification before advancing. Treats learning as a high school to college graduation progression. Use when user wants deep understanding, not surface familiarity.

3 0
Explore
asteroid-belt/skills

superplan

Use when starting significant features, epics, or complex tasks. Creates multi-phase implementation plans with parallelizable phases, poker estimates, TDD-first acceptance criteria, and quality gates. Detects tech stack from CLAUDE.md/AGENTS.md (bypassing internet research if complete) or via codebase scan.

3 0
Explore
asteroid-belt/skills

supercharge

Weekly codebase hygiene skill that identifies and fixes AI-generated code problems ("slop") using Martin Fowler's refactoring techniques. Scans for 15 common issues, prioritizes by severity, and generates superplan-compatible plans for systematic improvement.

3 0
Explore
asteroid-belt/skills

superdocs

Generates a docs/ directory of markdown files giving AI and humans deep context on WHAT a codebase is, HOW it works, and WHY decisions were made. Scans any codebase, produces structured documentation. Re-runnable — detects existing docs, monorepos, and git-based staleness. Runs automatically without user interaction.

3 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results