Skip to content

Commit dc550f5

Browse files
fix(cursor): discover Cursor's built-in skills (#18673)
Read ~/.cursor/skills-cursor as last-priority system scope, so /loop, /review and friends appear while project and user skills keep precedence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 68a448e commit dc550f5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎packages/provider-cursor/src/server/skills.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function parseSkillFrontmatter(contents: string): CursorSkillFrontmatter | undef
125125

126126
const discoverSkillsInRoot = Effect.fn("discoverCursorSkillsInRoot")(function* (input: {
127127
readonly directory: string;
128-
readonly scope: "user" | "project";
128+
readonly scope: "user" | "project" | "system";
129129
readonly budget: CursorSkillScanBudget;
130130
/** Real paths of the roots already walked in this scan. */
131131
readonly scannedRoots: Set<string>;
@@ -232,7 +232,12 @@ const inspectCursorSkills = Effect.fn("inspectCursorSkills")(function* (
232232
{ directory: path.join(base, ".codex", "skills"), scope },
233233
{ directory: path.join(base, ".claude", "skills"), scope },
234234
];
235-
const roots = [...(cwd ? rootsBelow(cwd, "project") : []), ...rootsBelow(userHome, "user")];
235+
const roots = [
236+
...(cwd ? rootsBelow(cwd, "project") : []),
237+
...rootsBelow(userHome, "user"),
238+
// Cursor syncs its built-in skills here; same-named user and project skills win.
239+
{ directory: path.join(userHome, ".cursor", "skills-cursor"), scope: "system" as const },
240+
];
236241

237242
const skillsByName = new Map<string, ServerProviderSkill>();
238243
const budget: CursorSkillScanBudget = {

0 commit comments

Comments
 (0)