Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-cursor): a symlinked skills root is no longer scanned twice #18664

MergedScottN-PV(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/18664/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 44 additions and 1 deletion.

x
0 of 2 viewed, 2 left
36 additions and 0 deletionspackages/provider-cursor/src/server/skills.test.tsModified
View file
@@ -185,6 +185,42 @@
}),
));
​
+ it.skipIf(!symlinksSupported)(
+ "scans a skills root linked to another root only once",
+ async () =>
+ await runNode(
+ Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const userHome = yield* fileSystem.makeTempDirectoryScoped({
+ directory: NodeOS.tmpdir(),
+ prefix: "cursor-skills-home-",
+ });
+ // More than half the entry budget, so a second walk of the same tree runs out.
+ const claudeRoot = path.join(userHome, ".claude", "skills");
+ yield* fileSystem.makeDirectory(path.join(claudeRoot, "review"), { recursive: true });
+ yield* fileSystem.writeFileString(
+ path.join(claudeRoot, "review", "SKILL.md"),
+ "---\n---\n",
+ );
+ yield* Effect.forEach(
+ Array.from({ length: 6_000 }, (_, index) => path.join(claudeRoot, `entry-${index}`)),
+ (file) => fileSystem.writeFileString(file, ""),
+ { concurrency: 64, discard: true },
+ );
+ yield* fileSystem.makeDirectory(path.join(userHome, ".agents"), { recursive: true });
+ yield* fileSystem.symlink(claudeRoot, path.join(userHome, ".agents", "skills"));
+​