feat(#1894): recursively discover skills in nested subdirectories#2146
feat(#1894): recursively discover skills in nested subdirectories#2146netwmr01 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3de5b7ceb6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
8824f6f to
0246866
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 024686675f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
0246866 to
7b5da9f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b5da9f0aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7b5da9f to
b03ecbd
Compare
b03ecbd to
55ec432
Compare
55ec432 to
403bf13
Compare
…irectories for safety Previously discover_skills() only scanned immediate children of a skills root, missing nested layouts like .agents/skills/cloudlive/skills/.../SKILL.md. Now recursively traverse subdirectories to find SKILL.md at any depth. (Full issue: MoonshotAI#1894) Symlink cycle protection: - Detect symlinks via stat(follow_symlinks=False) + S_ISLNK on all backends. - Never traverse into a symlinked intermediate directory. This prevents undetectable symlink cycles on remote backends (SSH/SFTP) where kaos lacks readlink() and resolve(). Symlinked skill directories (those containing SKILL.md directly) are still discovered. - On local backends, additionally deduplicate real directories using a visited set keyed by Path.resolve(). Additional safeguards: - emits a `logger.warning` a warning if recursive scanning takes longer than 3 seconds to help detect symlink issues, huge directories, or slow network mounts. Testing: - Added comprehensive tests covering many edge cases - Symlink cycle scenarios (self‑referential, mutual) - Deeply nested valid skill directories - Mixed symlink and real directory structures - Non‑local backend simulation - All existing tests pass.
403bf13 to
a97a26d
Compare
Previously, discover_skills() only scanned the immediate children of a skills root. This meant nested layouts like
.agents/skills/cloudlive/skills/cloudlive-project-layout/SKILL.md were invisible to Kimi CLI, even though Codex supports them.
Changes:
Related Issue
Resolve #1894
Description
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.