feat(skills): follow symlinked directories for user and repo skills #525
+163
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enables skill discovery to follow symlinked directories, allowing developers to symlink skills from shared locations (dotfiles repos, cross-agent skill collections).
Key Changes
How Symlink Following Works
flowchart TD A[Discover Skills] --> B{Is Symlink?} B -->|No| C[Process normally] B -->|Yes| D{Scope?} D -->|System| E[Skip - security] D -->|User/Repo| F{Points to dir?} F -->|No| G[Skip file symlinks] F -->|Yes| H{Already visited?} H -->|Yes| I[Skip - cycle detection] H -->|No| J[Add to queue & visited set]Related Issues
Related (upstream):
This PR brings the symlink fix to Every Code, since the upstream Codex rejected it.
Testing
follows_symlinked_directory_for_user_scope,ignores_symlinked_directory_for_system_scope,handles_circular_symlink_without_infinite_loopFiles Changed
code-rs/core/src/skills/loader.rs- Symlink following logic + testsdocs/skills.md- Updated docs to reflect new behavior