feat(install): gstack disabled by default — opt-in via toggle-external

gstack ships ~40 skills that all load into Claude's context. Keeping
them active by default taxes every session, even when the project has
no browser-QA or deploy workflow. install-plugins.sh now calls
`toggle-external.sh disable gstack` right after gstack's ./setup, so
fresh installs land with gstack symlinks staged in skills-disabled/.

update-all.sh captures the current enabled/disabled state before the
submodule bump and restores it afterwards — otherwise ./setup would
silently re-enable a user who had explicitly disabled gstack.

To use gstack: `bash lib/toggle-external.sh enable gstack`.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
bastien 2026-04-21 15:30:52 +02:00
parent e144dc78ee
commit 53d04db480
2 changed files with 26 additions and 5 deletions

View File

@ -256,11 +256,18 @@ if [ -d "$GSTACK_DIR" ]; then
else
warn "GStack ./setup not found or not executable — skipping"
fi
# Symlinks are handled by link.sh — verify it was run
if [ -L "$HOME/.claude/skills/gstack" ]; then
ok "GStack ready (submodule initialized, symlink OK)"
# Default policy: gstack is installed but DISABLED — enable on demand
# via `bash lib/toggle-external.sh enable gstack`. Rationale: gstack
# ships ~40 skills that all load into context; keep them off until
# the user signals a project where they matter (browser QA, deploy).
if [ -x "$REPO/lib/toggle-external.sh" ] \
&& [ "$(bash "$REPO/lib/toggle-external.sh" status gstack 2>/dev/null)" = "enabled" ]; then
info "Disabling gstack by default (no context cost until enabled)..."
bash "$REPO/lib/toggle-external.sh" disable gstack >/dev/null
ok "gstack installed, disabled — enable with: bash lib/toggle-external.sh enable gstack"
else
warn "GStack submodule ready but not symlinked — run: bash link.sh"
ok "GStack ready (submodule initialized, symlinks staged)"
fi
else
warn "GStack submodule directory not found after init — check .gitmodules"
@ -556,7 +563,7 @@ echo " ✅ rtk — token compression hook (0 tokens)"
echo " ✅ superpowers — brainstorm/plan/implement/debug workflow"
echo ""
echo " TOGGLE (installed but start OFF — /plugin-check recommends when needed):"
echo " 🔄 gstack — ~/.claude/skills/gstack/ (→ submodule)"
echo " 🔄 gstack — disabled by default (toggle: lib/toggle-external.sh enable gstack)"
echo " 🔄 gsd v2 — standalone CLI 'gsd' (gsd-pi, not a Claude Code plugin)"
echo " 🔄 plugin-dev — create plugins/skills (~100 tokens) [claude-code-plugins]"
echo " 🔄 pr-review-toolkit — /pr-review-toolkit:review-pr (~300 tokens) [claude-code-plugins]"

View File

@ -60,6 +60,14 @@ echo ""
printf " Proceed with GStack update? [y/N] "
read -r _gstack_confirm
if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then
# Capture gstack state before the update so we can restore it after
# ./setup runs (setup re-creates every symlink; without this, an
# update would silently re-enable a tool the user had disabled).
_gstack_state="unknown"
if [ -x "$REPO/lib/toggle-external.sh" ]; then
_gstack_state=$(bash "$REPO/lib/toggle-external.sh" status gstack 2>/dev/null || echo "unknown")
fi
if git submodule update --remote skills-external/gstack 2>/dev/null; then
if [ -d "skills-external/gstack" ]; then
if [ -x "skills-external/gstack/setup" ]; then
@ -76,6 +84,12 @@ if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then
else
warn "GStack submodule update failed — run: git submodule update --init"
fi
# Restore prior enabled/disabled state
if [ "$_gstack_state" = "disabled" ] && [ -x "$REPO/lib/toggle-external.sh" ]; then
bash "$REPO/lib/toggle-external.sh" disable gstack >/dev/null
info "gstack was disabled before update — restored to disabled"
fi
else
info "GStack update skipped"
fi