Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-cursor): installed node_modules no longer exhaust skill discovery #19806

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

Showing 2 changed files with 47 additions and 0 deletions.

x
0 of 2 viewed, 2 left
45 additions and 0 deletionspackages/provider-cursor/src/server/skills.test.tsModified
View file
@@ -163,6 +163,51 @@
}),
));
​
+ it("discovers skills across roots without scanning installed node_modules", 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-",
+ })
+ .pipe(Effect.flatMap((directory) => fileSystem.realPath(directory)));
+ const root = path.join(userHome, ".agents", "skills");
+ const dependencies = path.join(root, "review", "tests", "node_modules");
+ yield* fileSystem.makeDirectory(dependencies, { recursive: true });
+ yield* Effect.forEach(
+ Array.from({ length: 10_001 }, (_, index) => path.join(dependencies, `entry-${index}`)),
+ (file) => fileSystem.writeFileString(file, ""),
+ { concurrency: 64, discard: true },
+ );
+ const skillDirectories = [
+ path.join(root, "review"),
+ path.join(root, "sibling"),
+ path.join(userHome, ".claude", "skills", "later"),
+ ];
+ for (const directory of skillDirectories) {
+ yield* fileSystem.makeDirectory(directory, { recursive: true });