feat(toggle): enable/disable non-marketplace tools via lib/toggle-external.sh

`claude plugin enable|disable` only toggles marketplace plugins.
Tools living as symlinks (gstack per-skill entries, emil-design-eng,
darwin-skill, find-skills) had no lever — users had to edit symlinks
by hand. The new script moves symlinks in/out of skills-disabled/
so Claude Code stops or starts scanning them.

Also removes the legacy global `skills/gstack` symlink that shadowed
per-skill entries with a duplicate top-level "gstack" skill (same
description as "browse"). gstack detection in detect-plugins.sh now
probes an individual skill instead.

plugin-advisor reads the new script's `list` command when gathering
state and emits its `enable|disable` commands in recommendations.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
bastien
2026-04-21 13:50:40 +02:00
co-authored by Claude
parent 85637d83ec
commit ec14261c82
5 changed files with 198 additions and 11 deletions
+12 -8
View File
@@ -35,14 +35,18 @@ for item in hooks agents skills lib templates; do
CHANGED=$((CHANGED + 1))
done
if [ -d "$REPO/skills-external/gstack" ]; then
if [ -L "$CLAUDE/skills/gstack" ] && [ "$(readlink "$CLAUDE/skills/gstack")" = "$REPO/skills-external/gstack" ]; then
: # already correct
else
ln -sf "$REPO/skills-external/gstack" "$CLAUDE/skills/gstack"
CHANGED=$((CHANGED + 1))
fi
else
# GStack is exposed via per-skill symlinks under skills/ (browse,
# canary, autoplan, design-review, …) created by gstack's own
# `./setup`. A global `skills/gstack -> skills-external/gstack/`
# symlink duplicated the top-level gstack SKILL.md alongside those
# individual skills, producing two entries with the same description
# ("Fast headless browser for QA testing…"). Remove any stale global
# link — only per-skill entries remain.
if [ -L "$REPO/skills/gstack" ] || [ -L "$CLAUDE/skills/gstack" ]; then
rm -f "$REPO/skills/gstack" "$CLAUDE/skills/gstack"
CHANGED=$((CHANGED + 1))
fi
if [ ! -d "$REPO/skills-external/gstack" ]; then
echo "⚠️ GStack submodule not found — run: git submodule update --init"
fi