sync: auto-sync from GURU-5070 at 2026-06-07 20:52:31
Author: Mike Swanson Machine: GURU-5070 Timestamp: 2026-06-07 20:52:31
This commit is contained in:
@@ -520,6 +520,38 @@ else
|
||||
echo -e "${GREEN}[OK]${NC} Global commands already current."
|
||||
fi
|
||||
|
||||
# Phase 5c: Apply config — sync skills to the global Claude dir.
|
||||
# Skills are directories (SKILL.md + scripts/refs); the global ~/.claude/skills/ is
|
||||
# where the CLI loads invocable skills from. A machine that lost its global skills
|
||||
# (e.g. wiped) self-heals here. One-way (repo -> global), idempotent, soft-fails.
|
||||
echo ""
|
||||
echo "=== Phase 5c: Apply config (skills -> global) ==="
|
||||
GLOBAL_SKILL_DIR="$HOME/.claude/skills"
|
||||
set +e
|
||||
mkdir -p "$GLOBAL_SKILL_DIR"
|
||||
SKILL_UPDATED=0
|
||||
SKILL_NAMES=""
|
||||
if [ -d ".claude/skills" ]; then
|
||||
for d in .claude/skills/*/; do
|
||||
[ -d "$d" ] || continue
|
||||
name=$(basename "$d")
|
||||
dst="$GLOBAL_SKILL_DIR/$name"
|
||||
if [ ! -d "$dst" ] || ! diff -rq ".claude/skills/$name" "$dst" >/dev/null 2>&1; then
|
||||
rm -rf "$dst"
|
||||
if cp -rf ".claude/skills/$name" "$GLOBAL_SKILL_DIR/"; then
|
||||
SKILL_UPDATED=$((SKILL_UPDATED + 1))
|
||||
SKILL_NAMES="$SKILL_NAMES $name"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
set -e
|
||||
if [ "$SKILL_UPDATED" -gt 0 ]; then
|
||||
echo -e "${GREEN}[OK]${NC} Skills synced to global: $SKILL_UPDATED updated —$SKILL_NAMES"
|
||||
else
|
||||
echo -e "${GREEN}[OK]${NC} Global skills already current."
|
||||
fi
|
||||
|
||||
# Phase 6: Vault sync
|
||||
echo ""
|
||||
echo "=== Phase 6: Vault sync ==="
|
||||
|
||||
Reference in New Issue
Block a user