@devries-cameron20 / t3code Mirror · read-only / commits / 167f5eca94
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 23, 04:15 UTC

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

Scott Norteman committed Oct 18, 2026 at 15:09 UTC 167f5eca948a40ad613b4649e9cd26524903cb2c
2 files changed +47
packages/provider-cursor/src/server/skills.test.ts
+45
@@ -162,6 +162,51 @@ describe("Cursor skills", () => {
162 }),
163 ));
164
165 + it("discovers skills across roots without scanning installed node_modules", async () =>
166 + await runNode(
167 + Effect.gen(function* () {
168 + const fileSystem = yield* FileSystem.FileSystem;
169 + const path = yield* Path.Path;
170 + const userHome = yield* fileSystem
171 + .makeTempDirectoryScoped({
172 + directory: NodeOS.tmpdir(),
173 + prefix: "cursor-skills-home-",
174 + })
175 + .pipe(Effect.flatMap((directory) => fileSystem.realPath(directory)));
176 + const root = path.join(userHome, ".agents", "skills");
177 + const dependencies = path.join(root, "review", "tests", "node_modules");
178 + yield* fileSystem.makeDirectory(dependencies, { recursive: true });
179 + yield* Effect.forEach(
180 + Array.from({ length: 10_001 }, (_, index) => path.join(dependencies, `entry-${index}`)),
181 + (file) => fileSystem.writeFileString(file, ""),
182 + { concurrency: 64, discard: true },
183 + );
184 + const skillDirectories = [
185 + path.join(root, "review"),
186 + path.join(root, "sibling"),
187 + path.join(userHome, ".claude", "skills", "later"),
188 + ];
189 + for (const directory of skillDirectories) {
190 + yield* fileSystem.makeDirectory(directory, { recursive: true });
191 + yield* fileSystem.writeFileString(path.join(directory, "SKILL.md"), "---\n---\n");
192 + }
193 +
194 + const result = yield* probeCursorSkills(undefined, { HOME: userHome }).pipe(Effect.result);
195 + expect(result._tag).toBe("Success");
196 + if (result._tag !== "Success") return;
197 + expect(result.success).toEqual(
198 + skillDirectories
199 + .map((directory) => ({
200 + name: path.basename(directory),
201 + path: path.join(directory, "SKILL.md"),
202 + scope: "user",
203 + enabled: true,
204 + }))
205 + .sort((left, right) => left.name.localeCompare(right.name)),
206 + );
207 + }),
208 + ));
209 +
210 it("still fails discovery when a root holds more entries than the scan allows", async () =>
211 await runNode(
212 Effect.gen(function* () {
packages/provider-cursor/src/server/skills.ts
+2
@@ -197,6 +197,8 @@ const discoverSkillsInRoot = Effect.fn("discoverCursorSkillsInRoot")(function* (
197 return;
198 }
199 input.budget.remainingEntries -= 1;
200 + // Installed dependencies can exhaust the shared budget and hide unrelated skills.
201 + if (entry === "node_modules") continue;
202 const child = path.join(directory, entry);
203 const info = yield* orUndefined(fileSystem.stat(child), input.budget);
204 if (info?.type !== "Directory") continue;