Skip to content

Fix install.sh to support subdirectory-based Claude skills#2

Merged
cloudprobe merged 1 commit intomainfrom
fix/install-subdirectory-skills
Mar 27, 2026
Merged

Fix install.sh to support subdirectory-based Claude skills#2
cloudprobe merged 1 commit intomainfrom
fix/install-subdirectory-skills

Conversation

@cloudprobe
Copy link
Copy Markdown
Owner

@cloudprobe cloudprobe commented Mar 26, 2026

What

The install_claude loop in install.sh only globbed top-level *.md files:

for f in "$DOTFILES_DIR/claude/$dir/"*.md; do

This silently skips skills that use a subdirectory layout — like the recently added /research skill at claude/skills/research/SKILL.md. Running ./install.sh claude would complete without error but the skill would never be linked to ~/.claude/skills/.

Fix

Extend the glob to also match subdirectories:

for f in "$DOTFILES_DIR/claude/$dir/"*.md "$DOTFILES_DIR/claude/$dir/"/; do

Uses ${f%/} to strip the trailing slash before symlinking, so both flat files and directories are handled identically. Existing behavior for flat skills/rules/commands is unchanged.

Testing

./install.sh claude
ls -la ~/.claude/skills/
# research -> .../claude/skills/research  ✓

Summary by CodeRabbit

  • Chores
    • Installation script now supports flexible organization of skills, commands, rules, and agents—accommodating both individual files and nested directory structures for improved setup flexibility.

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d0279be9-3bdb-482c-b1e3-b451d953cf4d

📥 Commits

Reviewing files that changed from the base of the PR and between 971435b and 8fb9857.

📒 Files selected for processing (1)
  • install.sh

📝 Walkthrough

Walkthrough

The install.sh script's Claude symlinking loop was enhanced to support both top-level markdown files and nested subdirectory-based entries for commands, rules, skills, and agents, with updated path derivation logic and existence checks.

Changes

Cohort / File(s) Summary
Claude Symlink Script Updates
install.sh
Extended symlinking logic to iterate over both *.md files and subdirectories for commands, rules, skills, and agents; updated path derivation to use subdirectory basenames, changed symlink source to ${f%/}, and switched existence checks from -f to -e to accommodate directory entries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Links now flourish in nested trees,
Scripts dance with both files and subdirectories!
No more confusion, just one careful hop,
Symlinks aligned from root to top. 🔗✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix install.sh to support subdirectory-based Claude skills' directly and clearly describes the main change—extending install.sh to handle subdirectory-based skill paths.
Description check ✅ Passed The description covers the required template sections: 'What' explains the problem and fix, 'Which component' addresses install.sh, and testing is demonstrated with a concrete example.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/install-subdirectory-skills

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudprobe cloudprobe merged commit 9db88d5 into main Mar 27, 2026
2 checks passed
@cloudprobe cloudprobe deleted the fix/install-subdirectory-skills branch March 27, 2026 05:23
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.

2 participants