agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/devops/homebrew/SKILL.md

homebrew

Skill15 starsChanged 44 days agoMITView on GitHub

Expert Homebrew package manager assistance covering formulae, casks, taps, services, and bundle files (Brewfile). Use when managing developer tools and macOS/Linux system dependencies.

  • Installs packages

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run brew update and brew upgrade regularly to receive security patches and updated formulae.

    line 137
  2. Very specific:

    Run brew doctor if build links or dependency paths become corrupted.

    line 139
  3. Very specific:

    Run sudo brew ...; Homebrew is explicitly designed to run as an unprivileged user.

    line 143
  4. Very specific:

    Leave orphaned dependencies.

    line 145

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Homebrew

Homebrew is the premier package manager for macOS and Linux, simplifying the installation and declarative management (via Brewfiles) of developer tools and libraries.

When to Use

  • macOS & Linux Developer Environment Setup: Installing command-line utilities, programming runtimes, and GUI applications.
  • Automating Workstation Provisioning with Brewfile: Declaring team development environments using brew bundle.
  • Authoring Custom Enterprise Formulae & Taps: Distributing internal CLI tools and binaries via private GitHub taps.
  • System Service Management: Managing background daemons (PostgreSQL, Redis, Nginx) using brew services.

Quick Start

# Install wget
brew install wget

# Install VS Code (Cask)
brew install --cask visual-studio-code

Core Concepts

Declarative Workstation Setup with Brewfile

Specifying developer dependencies for automated bootstrapping:

# Brewfile in repository root
tap "homebrew/bundle"
tap "hashicorp/tap"

# CLI Utilities & Runtimes
brew "git"
brew "zsh"
brew "node@22"
brew "python@3.12"
brew "rust"
brew "hashicorp/tap/terraform"
brew "gh"
brew "jq"

# Background Development Daemons
brew "postgresql@16", restart_service: true
brew "redis", restart_service: true

# GUI Applications (macOS Casks)
cask "visual-studio-code"
cask "docker"
cask "raycast"
cask "postman"
# Install all dependencies declared in Brewfile
brew bundle --file=./Brewfile

# Check for unmanaged or missing dependencies
brew bundle check

Authoring a Custom Formula in Ruby

Packaging a CLI tool for distribution via a custom tap:

# Formula/mytool.rb
class Mytool < Formula
  desc "Cloud deployment and verification CLI for enterprise platforms"
  homepage "https://github.com/my-org/mytool"
  url "https://github.com/my-org/mytool/releases/download/v1.0.0/mytool-1.0.0.tar.gz"
  sha256 "a1b2c3d4e5f60718293a4b5c6d7e8f90123456789abcdef0123456789abcdef0"
  license "MIT"

  depends_on "node@22"

  def install
    bin.install "bin/mytool"
    prefix.install "lib"
  end

  test do
    assert_match "mytool version 1.0.0", shell_output("#{bin}/mytool --version")
  end
end

Managing Background Services with brew services

Starting and monitoring local services:

# Start PostgreSQL service in background
brew services start postgresql@16

# Inspect running services status
brew services list

# Stop service
brew services stop postgresql@16

Common Patterns

Reproducible Developer Machine Setup with Brewfile

Problem: Onboarding new developers requires manually running dozens of brew install commands.

Solution: Define team developer tooling in a version-controlled Brewfile:

# Brewfile
tap "homebrew/bundle"

brew "git"
brew "node@20"
brew "postgresql@16", restart_service: true
brew "gh"

cask "docker"
cask "visual-studio-code"

Execute setup: brew bundle install

Best Practices

Do:

  • Maintain a Brewfile in dotfiles or team repos to make onboarding new engineers reproducible.
  • Run brew update and brew upgrade regularly to receive security patches and updated formulae.
  • Pin major versions of runtimes (brew "node@22", brew "postgresql@16") to avoid breaking updates.
  • Run brew doctor if build links or dependency paths become corrupted.

Don't:

  • Run sudo brew ...; Homebrew is explicitly designed to run as an unprivileged user.
  • Modify files directly inside /opt/homebrew or /usr/local/Homebrew manually.
  • Leave orphaned dependencies; clean up disk space periodically with brew cleanup.

Troubleshooting

ErrorCauseSolution
Error: Your CLT does not support macOS ...Outdated Xcode Command Line Tools.Reinstall tools: xcode-select --install and run brew doctor.
Error: Formula '...' is not installedAttempting to link or start service for uninstalled formula.Install formula first: brew install <formula>.
brew doctor reporting permission warnings in /opt/homebrewFiles in Homebrew prefix owned by root instead of current user.Fix ownership: sudo chown -R $(whoami) $(brew --prefix)/*.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.