Skip to content

fix: clean up prefix-mode gstack-* directories on uninstall#902

Open
mvanhorn wants to merge 2 commits intogarrytan:mainfrom
mvanhorn:fix/896-uninstall-prefix-mode-cleanup
Open

fix: clean up prefix-mode gstack-* directories on uninstall#902
mvanhorn wants to merge 2 commits intogarrytan:mainfrom
mvanhorn:fix/896-uninstall-prefix-mode-cleanup

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Apr 8, 2026

Summary

gstack-uninstall skips real gstack-* directories in ~/.claude/skills/ because the Claude cleanup section only iterates symlinks ([ -L ] || continue). Prefix-mode installs create real directories (gstack-browse/, gstack-qa/, etc.), not symlinks, so they survive uninstall.

Changes

Added glob-based cleanup for gstack-* entries in three places:

  1. Global ~/.claude/skills/gstack-* directories (matches existing Codex/Factory/Kiro pattern)
  2. Project-local .claude/skills/gstack-* directories
  3. Confirmation prompt now shows prefix directory count

Testing

New test: creates real gstack-browse/ and gstack-qa/ directories, runs --force uninstall, verifies both are removed while non-gstack directories survive.

All existing tests pass (7/7 new, 1 pre-existing failure on clean system test unrelated to this change - the SessionStart hook fires even on clean systems).

Fixes #896

This contribution was developed with AI assistance (Claude Code).

mvanhorn added 2 commits April 7, 2026 21:08
The Claude cleanup section only removed symlinks pointing into gstack/,
missing real gstack-* directories created by prefix-mode installs. This
adds glob-based cleanup matching the pattern already used for Codex,
Factory, and Kiro hosts. Also handles project-local prefix-mode dirs
and shows prefix directory count in the confirmation prompt.

Fixes garrytan#896
Verifies that real gstack-* directories (not symlinks) in
~/.claude/skills/ are removed by gstack-uninstall, while
non-gstack directories are preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gstack-uninstall leaves orphaned ~/.claude/skills/gstack-* directories (prefix-mode install)

1 participant