Skip to content

Commit ae2e389

Browse files
committed
fix: Stop hook broken on Windows Git Bash (closes #133)
Two separate bugs, both reported by @nazeshinjite with a really thorough diagnosis (the Claude output they included nailed it). First: `export SD=` was failing as a shell builtin in Windows Git Bash when invoked from Command Prompt — bash treated it like an external command and threw "No such file or directory". Removed `export` across all IDE variants. Second, the real problem for Claude Code users: the fallback path `$HOME/.claude/plugins/planning-with-files` doesn't exist. The actual install is under `~/.claude/plugins/cache/`. The Claude Code variants now use PowerShell's own `Get-ChildItem -Recurse` with `~` expansion to find the script without relying on any path variable, and a glob-based sh fallback for Unix. No hardcoded path, no CLAUDE_PLUGIN_ROOT dependency. Fixed across all 13 SKILL.md variants.
1 parent 9f158bf commit ae2e389

File tree

15 files changed

+36
-28
lines changed

15 files changed

+36
-28
lines changed

.codebuddy/skills/planning-with-files/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"${CODEBUDDY_PLUGIN_ROOT:-$HOME/.codebuddy/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
24+
command: "SD=\"${CODEBUDDY_PLUGIN_ROOT:-$HOME/.codebuddy/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727

2828
---
2929

.codex/skills/planning-with-files/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"${CODEX_SKILL_ROOT:-$HOME/.codex/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
24+
command: "SD=\"${CODEX_SKILL_ROOT:-$HOME/.codex/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727

2828
---
2929

.cursor/skills/planning-with-files/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"${CURSOR_SKILL_ROOT:-.cursor/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
24+
command: "SD=\"${CURSOR_SKILL_ROOT:-.cursor/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727

2828
---
2929

.factory/skills/planning-with-files/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"${FACTORY_PROJECT_DIR:-.factory/skills/planning-with-files}/scripts\"; sh \"$SD/check-complete.sh\" 2>/dev/null || true"
24+
command: "SD=\"${FACTORY_PROJECT_DIR:-.factory/skills/planning-with-files}/scripts\"; sh \"$SD/check-complete.sh\" 2>/dev/null || true"
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727
---
2828

2929
# Planning with Files

.mastracode/skills/planning-with-files/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"$HOME/.mastracode/skills/planning-with-files/scripts\"; [ -f \"$SD/check-complete.sh\" ] || export SD=\".mastracode/skills/planning-with-files/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
24+
command: "SD=\"$HOME/.mastracode/skills/planning-with-files/scripts\"; [ -f \"$SD/check-complete.sh\" ] || SD=\".mastracode/skills/planning-with-files/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727

2828
---
2929

.opencode/skills/planning-with-files/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"${OPENCODE_SKILL_ROOT:-$HOME/.config/opencode/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
24+
command: "SD=\"${OPENCODE_SKILL_ROOT:-$HOME/.config/opencode/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727

2828
---
2929

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.34.1] - 2026-04-17
6+
7+
### Fixed
8+
9+
- **Stop hook portability failure on Windows Git Bash** (closes #133, reported by @nazeshinjite) — Two independent bugs caused the Stop hook to silently fail on Windows 11 with Git Bash inside Command Prompt: (1) `export SD=` was treated as an external command rather than a shell builtin in certain Windows Git Bash invocation contexts, producing `bash: export: No such file or directory`; (2) the fallback path `$HOME/.claude/plugins/planning-with-files` never exists — the actual install location is `~/.claude/plugins/cache/planning-with-files/planning-with-files/VERSION/`. Fixed across all 13 SKILL.md variants (Claude Code, Codex, CodeBuddy, Cursor, Factory, Mastra Code, OpenCode, all language variants). Claude Code variants now use PowerShell self-discovery via `Get-ChildItem -Recurse` with `~` home expansion (no bash variable needed) and a glob-based sh fallback against the correct cache path. All other IDE variants have `export SD=` replaced with `SD=`.
10+
511
## [2.34.0] - 2026-04-15
612

713
### Added

CONTRIBUTORS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ These developers have created forks that extend the functionality:
186186

187187
Thank you to everyone who reported issues, provided feedback, and helped test fixes:
188188

189+
- [@nazeshinjite](https://github.com/nazeshinjite) - Issue #133 (Stop hook portability failure on Windows Git Bash — two-root-cause diagnosis with full Claude output, fixed in v2.34.1)
189190
- [@msuadOf](https://github.com/msuadOf) - Issue #93 (TMPDIR environment fix for plugin install)
190191
- [@DorianZheng](https://github.com/DorianZheng) - Issue #84 (BoxLite sandbox integration proposal)
191192
- [@mtuwei](https://github.com/mtuwei) - Issue #32 (Windows hook error)
@@ -214,6 +215,6 @@ If you've contributed and don't see your name here, please open an issue! We wan
214215

215216
---
216217

217-
**Total Contributors:** 32+ and growing!
218+
**Total Contributors:** 33+ and growing!
218219

219-
*Last updated: April 15, 2026*
220+
*Last updated: April 17, 2026*

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![Security Verified](https://img.shields.io/badge/Security-Audited_%26_Fixed_v2.21.0-blue)](docs/evals.md)
1414

1515
[![Skills Playground](https://skillsplayground.com/badges/installs/othmanadi-planning-with-files-planning-with-files.svg)](https://skillsplayground.com/skills/othmanadi-planning-with-files-planning-with-files/)
16-
[![Version](https://img.shields.io/badge/version-2.34.0-brightgreen)](https://github.com/OthmanAdi/planning-with-files/releases)
16+
[![Version](https://img.shields.io/badge/version-2.34.1-brightgreen)](https://github.com/OthmanAdi/planning-with-files/releases)
1717
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1818
[![Closed Issues](https://img.shields.io/github/issues-closed/OthmanAdi/planning-with-files?color=success)](https://github.com/OthmanAdi/planning-with-files/issues?q=is%3Aissue+is%3Aclosed)
1919
[![Closed PRs](https://img.shields.io/github/issues-pr-closed/OthmanAdi/planning-with-files?color=success)](https://github.com/OthmanAdi/planning-with-files/pulls?q=is%3Apr+is%3Aclosed)
@@ -63,10 +63,11 @@ See the full list of everyone who made this project better in [CONTRIBUTORS.md](
6363
<details>
6464
<summary><strong>📦 Releases & Session Recovery</strong></summary>
6565

66-
### Current Version: v2.34.0
66+
### Current Version: v2.34.1
6767

6868
| Version | Highlights |
6969
|---------|------------|
70+
| **v2.34.1** | **Stop hook Windows portability fix** (closes #133): `export SD=` failed in Windows Git Bash hook context; fallback path was wrong for plugin cache structure. Fixed across all 13 SKILL.md variants. (thanks @nazeshinjite!) |
7071
| **v2.34.0** | **Codex hooks fully restored** (closes #132): `.codex/hooks.json` + lifecycle scripts back — SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop. Tessl CI for SKILL.md quality reviews. Exec bit fix. 4 missing contributors added. (thanks @Leon-Algo, @popey!) |
7172
| **v2.33.0** | **Multi-language expansion**: Arabic, German, and Spanish skill variants added (thanks to community contributors!) |
7273
| **v2.32.0** | Codex session catchup rewrite (thanks @ebrevdo!), Loaditout A-grade security badge, Stop hook Git Bash fix |

skills/planning-with-files-ar/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ hooks:
2121
Stop:
2222
- hooks:
2323
- type: command
24-
command: "export SD=\"${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/planning-with-files-ar}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
24+
command: "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command \"& (Get-ChildItem -Path (Join-Path ~ '.claude/plugins/cache') -Filter check-complete.ps1 -Recurse -EA 0 | Select-Object -First 1).FullName\" 2>/dev/null || sh \"$(ls $HOME/.claude/plugins/cache/*/*/*/scripts/check-complete.sh 2>/dev/null | head -1)\" 2>/dev/null || true"
2525
metadata:
26-
version: "2.34.0"
26+
version: "2.34.1"
2727
---
2828

2929
# نظام تخطيط الملفات

0 commit comments

Comments
 (0)