fix(provider-cursor): a skill tree deeper than the scan limit no longer hides every skill #17389
main fromrefs/pull/17389/head·merged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHubProblem#
Cursor skill discovery shares one scan budget across all eight roots. When a directory at the depth limit (10) has a subdirectory, the walker marks the budget exhausted, so one stale deep tree under a user root such as ~/.claude/skills fails discovery for every root and the composer shows no Cursor skills (#17215).
Change#
A directory past the depth limit is skipped instead of failing the scan. The entry budget and filesystem errors still fail the probe. Skills nested more than 10 levels below a root are still not discovered. Cursor does not document its own loader's depth limit, so parity with it is unverified.
Scope and approval#
Closes #17215. The triage comment confirms the cause on main and notes that #9180's reason for failing hard (a transient read error) does not apply to the depth limit. #16430 also edits this scanner, for plugin skills, and leaves the depth branch unchanged.
Verification#
An agent ran these checks. No person tested the change.
Dev app on Linux (vp run dev), Cursor provider signed in with an API key, a project skill review in the workspace, and a stale 11-level tree under ~/.claude/skills (server HOME pointed at a throwaway folder). Opening the $ skill menu in the composer with Cursor selected:
Before (main) | After |
|---|---|
On main the server log shows Failed to discover Cursor skills caused by CursorSkillsProbeError ... (scan-budget-exhausted). With the change, the project skill appears; the stale skill 11 levels down stays hidden. The other entries are Codex's built-in skills, which the Codex provider placed in the throwaway home.
- New tests in
skills.test.ts: a project skill plus a user tree with a skill at depth 10, one below it, and a shallow sibling after the deep tree. Discovery and the probe return the project skill, the depth-10 skill, and the sibling. Onmainthe test fails because discovery omits the sibling. A second test checks that a root with more than 10,000 entries still fails the probe. packages/provider-cursoron Linux:vp test run, 13 files, 103 tests pass. Typecheck passes.vp lintandvp fmt --checkon the two changed files pass.
Model: Claude Opus 5.5, Claude Fable 5.1 (review), GPT-6-Astra (review). Harness: Claude Code, Codex.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Approvability#
Verdict: Approved at
eedd33dMacroscope's review found this PR approvable — The PR makes a small, targeted fix to Cursor skill discovery so an over-deep directory is ignored rather than suppressing all other skills. Regression tests cover the corrected behavior and preserve the existing scan-budget safeguard.
Notes:
- Diff unchanged. Approvability was decided on eligibility alone.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
4dc96686-5af1-4121-afa9-c07fae3a5820
📥 Commits
Reviewing files that changed from the base of the PR and between 42c6623d492850c747b7ba06c1d0f1e1559d0ad5 and eedd33d28b2522a49a24ca88dbeeef53b7656361.
📒 Files selected for processing (2)
packages/provider-cursor/src/server/skills.test.tspackages/provider-cursor/src/server/skills.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
Cursor skill discovery now skips directories beyond the maximum depth and continues scanning later entries. Tests cover skills at and beyond the depth limit, later user and project skills, and the separate scan-budget exhaustion case.
Changes#
Cursor skill discovery
Layer / File(s) Summary Depth-limit scanning and validation
packages/provider-cursor/src/server/skills.ts,packages/provider-cursor/src/server/skills.test.tsTraversal skips children beyond the maximum depth and continues scanning siblings. Tests check discovery across user and project roots and confirm that exceeding the entry budget still reports scan-budget-exhausted.Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
eedd3The depth-limit change appears mergeable after normal checks; no unresolved issue is identified.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation Title check The title clearly and concisely describes the main change: preventing an over-deep Cursor skill tree from hiding other skills. Description check The description includes all required sections. It explains the problem, the change, scope and approval, and focused verification results. It also states that no person tested the change and identifie… Linked Issues check For #17215,discoverSkillsInRootnow skips directories atMAX_SKILL_DEPTHinstead of setting the shared budget to exhausted. The scan can continue to sibling directories and other roots. The repor…Out of Scope Changes check The changes are limited to Cursor skill traversal and tests for the requested depth-limit behavior and retained entry-budget behavior. These changes directly support #17215. No unrelated production be…✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.coderabbitai[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge added labelsmacroscope-review
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed