@devries-cameron20 / t3code Mirror · read-only / commits / ce8d644eda
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 18:15 UTC

fix(cursor): discover built-in skills in the composer (#24595)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 24, 2026 at 17:17 UTC ce8d644eda4418321eb74241ceb5a4c9e60c2b81
2 files changed +19 -3
packages/provider-cursor/src/server/skills.test.ts
+12 -1
@@ -19,7 +19,7 @@ const runNode = <A, E>(
19 ) => effect.pipe(Effect.scoped, Effect.provide(NodeServices.layer), Effect.runPromise);
20
21 describe("Cursor skills", () => {
22 - it("discovers recursive project skills with project precedence", async () =>
22 + it("discovers project, user, then built-in skills by precedence", async () =>
23 await runNode(
24 Effect.gen(function* () {
25 const fileSystem = yield* FileSystem.FileSystem;
@@ -66,6 +66,10 @@ describe("Cursor skills", () => {
66 "oversized",
67 "x".repeat(1_000_001),
68 );
69 + const builtinRoot = path.join(userHome, ".cursor", "skills-cursor");
70 + yield* writeSkill(builtinRoot, "loop", "---\ndescription: builtin loop\n---\n");
71 + yield* writeSkill(builtinRoot, "review", "---\ndescription: builtin review\n---\n");
72 + yield* writeSkill(builtinRoot, "ide-only", "---\nmetadata:\n surfaces:\n - ide\n---\n");
73 yield* fileSystem.makeDirectory(path.join(userHome, ".codex"), { recursive: true });
74 yield* fileSystem.writeFileString(
75 path.join(userHome, ".codex", "skills"),
@@ -81,6 +85,13 @@ describe("Cursor skills", () => {
85 enabled: true,
86 userInvocable: false,
87 },
88 + {
89 + name: "loop",
90 + description: "builtin loop",
91 + path: path.join(builtinRoot, "loop", "SKILL.md"),
92 + scope: "system",
93 + enabled: true,
94 + },
95 {
96 name: "oversized",
97 path: path.join(workspace, ".cursor", "skills", "oversized", "SKILL.md"),
packages/provider-cursor/src/server/skills.ts
+7 -2
@@ -125,7 +125,7 @@ function parseSkillFrontmatter(contents: string): CursorSkillFrontmatter | undef
125
126 const discoverSkillsInRoot = Effect.fn("discoverCursorSkillsInRoot")(function* (input: {
127 readonly directory: string;
128 - readonly scope: "user" | "project";
128 + readonly scope: "user" | "project" | "system";
129 readonly budget: CursorSkillScanBudget;
130 /** Real paths of the roots already walked in this scan. */
131 readonly scannedRoots: Set<string>;
@@ -232,7 +232,12 @@ const inspectCursorSkills = Effect.fn("inspectCursorSkills")(function* (
232 { directory: path.join(base, ".codex", "skills"), scope },
233 { directory: path.join(base, ".claude", "skills"), scope },
234 ];
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 + ];
241
242 const skillsByName = new Map<string, ServerProviderSkill>();
243 const budget: CursorSkillScanBudget = {