Don't let Windows kill your vibe coding flow.
Every Claude Code plugin assumes you're on macOS or Linux.
If you're on Windows, your sessions start with a wall of red errors.
win-hooks fixes that. Automatically. Every session.
You're on Windows. You install a shiny new Claude Code plugin. You start a session. Then:
SessionStart hook error: /bin/bash: command not found
PreToolUse hook error: scripts/check.sh: No such file or directory
PostToolUse hook error: semgrep: command not found
Stop hook error: ...
Every. Single. Plugin. Written on a Mac. Tested on Linux. Shipped with .sh scripts that Windows has never heard of.
You didn't choose the wrong OS. The ecosystem just forgot about you.
Install win-hooks once. Forget about it forever.
claude plugin marketplace add LilMGenius/win-hooks
claude plugin install win-hooksThat's it. Next session, win-hooks silently patches every broken plugin before you even notice. No config. No flags. No manual fixing.
Every time Claude Code starts, win-hooks runs a pipeline:
scan all plugins → detect incompatible hooks → generate wrappers → patch hooks.json
- Scans
~/.claude/plugins/installed_plugins.jsonfor all installed plugins - Detects
.shscripts, missing binaries, and Unix-only commands - Creates polyglot
.cmdwrappers that work on bothcmd.exeand bash - Patches each plugin's
hooks.json(originals backed up as.bak) - Skips anything already compatible — safe to run a thousand times
The core innovation is a .cmd file that is simultaneously valid batch and valid bash:
: << 'CMDBLOCK'
@echo off
REM Windows cmd.exe runs this part → finds Git Bash → delegates
"C:\Program Files\Git\bin\bash.exe" "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%
CMDBLOCK
# bash runs this part → executes directly
exec bash "${SCRIPT_DIR}/${SCRIPT_NAME}" "$@"- Windows:
cmd.exeignores the heredoc, runs the batch portion, finds Git Bash, delegates - macOS/Linux: bash treats
:as a no-op, skips to the shell portion, runs natively - Result: One file. Both platforms. Zero friction.
plugin/
├── hooks/
│ ├── hooks.json ← patched to point to _hooks/
│ └── hooks.json.bak ← original backup
├── _hooks/ ← win-hooks creates this
│ ├── run-hook.cmd ← polyglot entry point
│ ├── setup ← extensionless bash wrapper
│ └── check-tool ← extensionless bash wrapper
└── scripts/
└── setup.sh ← original (untouched)
Wrappers live in a dedicated _hooks/ directory — original plugin files are never modified or overwritten.
| Command | Description |
|---|---|
/win-hooks:fix |
Manually trigger the patcher (auto-runs at session start) |
/win-hooks:status |
Show compatibility status of all installed plugins |
When a plugin updates, its install path changes and patches are lost. This is by design. Restart Claude Code → win-hooks re-detects and re-patches automatically. Zero maintenance.
- Windows 10/11 with Git for Windows
- Python 3 —
winget install Python.Python.3or python.org - Claude Code CLI
Note: win-hooks auto-creates a
python3alias if onlypython.exeexists — so other plugins that callpython3won't break either.
Project structure
| Component | Purpose |
|---|---|
hooks/hooks.json |
SessionStart hook — triggers auto-patching |
hooks/patch-all |
Orchestrator — platform check → find python → run pipeline |
hooks/run-hook.cmd |
Polyglot template — copied to each patched plugin |
scripts/find-incompatible.py |
Scanner — detects incompatible hooks across all plugins |
scripts/apply-patches.py |
Patcher — creates wrappers and updates hooks.json |
commands/fix.md |
/win-hooks:fix command definition |
commands/status.md |
/win-hooks:status command definition |
skills/diagnose/ |
Diagnostic skill for hook errors |
Compatibility rules
| Pattern | Verdict | Reason |
|---|---|---|
.cmd in command |
COMPATIBLE | Already Windows-native |
.sh in command |
INCOMPATIBLE | Needs bash wrapper |
python3 / node prefix |
COMPATIBLE | Interpreter handles it |
.py in command |
COMPATIBLE | Python file association works |
| Bare command not in PATH | INCOMPATIBLE | Missing binary |
Built for the Windows developers who refuse to switch to Mac just to vibe code.
MIT — Use it, fork it, vibe with it.