From 8fb98578371b66513bbe344e82e2af5f31569e18 Mon Sep 17 00:00:00 2001 From: Rajit Shah Date: Thu, 26 Mar 2026 09:14:17 -0500 Subject: [PATCH] Fix install.sh to link subdirectory-based Claude skills The glob pattern only matched top-level *.md files, silently skipping skills like /research that use a subdirectory layout (skills/research/SKILL.md). Extend the loop to also match directories so both structures install correctly. --- install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 8c9da89..81c3a8d 100755 --- a/install.sh +++ b/install.sh @@ -108,14 +108,16 @@ install_claude() { fi # commands/rules/skills/agents — skip files that already exist (don't overwrite custom ones) + # Handles both flat *.md files and subdirectory-based skills (e.g. skills/research/SKILL.md) for dir in commands rules skills agents; do - for f in "$DOTFILES_DIR/claude/$dir/"*.md; do - [ -f "$f" ] || continue - dest=~/.claude/$dir/$(basename "$f") + for f in "$DOTFILES_DIR/claude/$dir/"*.md "$DOTFILES_DIR/claude/$dir/"*/; do + [ -e "$f" ] || continue + name=$(basename "${f%/}") + dest=~/.claude/$dir/$name if [ -e "$dest" ] && [ ! -L "$dest" ]; then - echo " Skipped $dir/$(basename "$f") — already exists (not overwriting)" + echo " Skipped $dir/$name — already exists (not overwriting)" else - lns "$f" "$dest" + lns "${f%/}" "$dest" fi done done