#16295: fix: filter brew install options when brew is unavailable
agents
stale
size: S
Cluster:
Windows Skills Fixes
## Summary
- Filters out `brew`-based skill install options when `brew` is not available on the system
- Prevents confusing "brew not installed" errors during onboarding in Docker containers and other environments without Homebrew
- Skills with alternative install methods (npm, uv, go) automatically fall back to those options
Closes #14593
## Changes
**`src/agents/skills-status.ts`** — Extended `normalizeInstallOptions()` to check `hasBinary("brew")` and filter out brew-kind install specs when brew is unavailable. Uses the existing `hasBinary` utility (already imported).
**`src/agents/skills-status.filters-brew-when-unavailable.e2e.test.ts`** — New test file with 2 tests:
1. Brew-only skill gets empty install array when brew unavailable
2. Multi-install skill (brew + node) falls back to node when brew unavailable
## How it works
Before: Skills with `kind: "brew"` install specs passed the OS filter (Linux includes Docker) and appeared selectable, then failed at install time with "brew not installed".
After: Skills with `kind: "brew"` install specs are filtered out at selection time when brew is unavailable. This is environment-agnostic — works in Docker, bare-metal Linux without brew, WSL without brew, etc.
## Test plan
- [x] New e2e tests pass (7/7 across related files)
- [x] Lint: 0 warnings, 0 errors
- [x] Existing skills-status tests unaffected
- [ ] Manual: Run `openclaw onboard` in Docker container, verify brew skills not offered
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Filters out `brew`-based skill install options in `normalizeInstallOptions()` when Homebrew is not available on the system, preventing confusing "brew not installed" errors during onboarding in Docker containers and other environments without Homebrew.
- Extended `normalizeInstallOptions()` in `skills-status.ts` to check `hasBinary("brew")` and exclude brew-kind install specs when brew is unavailable
- Skills with alternative install methods (npm, uv, go) automatically fall back to those options
- Added two well-structured e2e tests covering the brew-only and multi-install fallback scenarios
- Clean, minimal change that integrates well with the existing OS-based filtering pattern
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it adds a straightforward availability check that prevents broken install options from being surfaced.
- The change is minimal, well-scoped, and follows existing patterns in the codebase. It adds a `hasBinary("brew")` check (already used elsewhere in this file at line 93) to the filter pipeline, with no risk of regression. The brew availability result is correctly hoisted outside the filter callback for efficiency. Both new tests are properly structured and cover the key scenarios. No logical errors, security concerns, or edge cases found.
- No files require special attention
<sub>Last reviewed commit: 1636063</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#9227: Fix: Windows Web UI shows 'brew not installed' for all skills
by vishaltandale00 · 2026-02-05
86.7%
#23079: fix(skills): fallback to npm for summarize skill on non-darwin systems
by charojo · 2026-02-22
83.3%
#21116: fix(skills): don't cache negative binary lookups
by heyrtl · 2026-02-19
82.2%
#22370: fix(skills): resolve Homebrew/common binary locations
by AIflow-Labs · 2026-02-21
78.1%
#8075: fix(skills): add --ignore-scripts to all package managers
by yubrew · 2026-02-03
78.0%
#22198: fix(skills): treat empty allowBundled array as block-all
by haitao-sjsu · 2026-02-20
76.0%
#21839: fix(skills): allowBundled: [] now blocks all bundled skills
by hydro13 · 2026-02-20
75.7%
#12076: fix(skills): recursive directory filtering to actually exclude venv...
by xiaoyaner0201 · 2026-02-08
75.2%
#3324: Update Dockerfile to support Homebrew and Go for skill execution
by nnnet · 2026-01-28
75.0%
#7938: fix(agents): install node skills with --prefix CONFIG_DIR for non-r...
by logozorro · 2026-02-03
74.7%