#9516: fix(skills): detect Windows executables with extensions
agents
stale
Cluster:
Windows Skills Fixes
## Summary
On Windows, the `hasBinary()` function failed to detect installed executables because it searched for exact names (e.g., `gh`) instead of names with extensions (e.g., `gh.exe`).
This caused skills like GitHub to show "Missing: bin:gh" in the dashboard even when the CLI was properly installed.
## Changes
- Updated `hasBinary()` in `src/agents/skills/config.ts` to check common Windows executable extensions (`.exe`, `.cmd`, `.bat`, `.com`) when running on Windows
- Only applies when the binary name doesn't already have an extension
- No behavior change on non-Windows platforms
## Testing
Verified manually on Windows 11 (x64):
```
process.platform: win32
process.arch: x64
gh found: true (via gh.exe)
```
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
- Updates `hasBinary()` to improve Windows detection by checking `PATHEXT`-based executable extensions (e.g., `.exe`, `.cmd`) when probing entries in `PATH`.
- Avoids extension-probing when the requested binary already ends with one of the known executable extensions.
- Leaves non-Windows behavior unchanged by defaulting to exact-name checks only.
- Intended to fix skill eligibility checks that previously reported missing CLIs on Windows when only `*.exe` existed.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- Change is small, localized to Windows-specific PATH resolution behavior, and uses PATHEXT with a reasonable fallback; no new external dependencies and non-Windows logic is unchanged.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#22370: fix(skills): resolve Homebrew/common binary locations
by AIflow-Labs · 2026-02-21
79.6%
#9227: Fix: Windows Web UI shows 'brew not installed' for all skills
by vishaltandale00 · 2026-02-05
74.4%
#8075: fix(skills): add --ignore-scripts to all package managers
by yubrew · 2026-02-03
72.8%
#11858: Exec: surface skill hints on command-not-found failures
by frankisawesome · 2026-02-08
72.7%
#6045: fix(auth): fix Gemini CLI path detection for global npm installs on...
by ehgamemo · 2026-02-01
72.5%
#21116: fix(skills): don't cache negative binary lookups
by heyrtl · 2026-02-19
72.3%
#10708: fix: handle Windows PATH case-sensitivity in exec environment
by Yida-Dev · 2026-02-06
72.2%
#17951: fix: macOS app: Skill binary detection does not respect /etc/paths ...
by MisterGuy420 · 2026-02-16
71.9%
#9250: Fix: Add shell:true for Windows .cmd files to prevent spawn EINVAL ...
by vishaltandale00 · 2026-02-05
71.9%
#3933: fix(skills): Make skill scripts executable
by jaysonsantos · 2026-01-29
71.8%