Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): Claude skill discovery resolves each repository root once #29757

Mergedonlydole(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/29757/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 77 additions and 7 deletions.

x
0 of 2 viewed, 2 left
65 additions and 0 deletionsapps/server/src/provider/Drivers/ClaudeSkills.test.tsModified
View file
@@ -209,6 +209,71 @@
}),
​
+ it.effect("resolves each install record's project repository once per discovery", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ // Real path: macOS temp dirs sit behind a /var -> /private/var symlink.
+ const tempDir = yield* fs.realPath(
+ yield* fs.makeTempDirectoryScoped({ prefix: "t3-claude-skills-" }),
+ );
+ const configDir = path.join(tempDir, "claude-home");
+ const workspace = path.join(tempDir, "workspace");
+ const otherProject = path.join(tempDir, "other", "packages", "app");
+ const sameRepoProject = path.join(workspace, "packages", "app");
+ yield* fs.makeDirectory(path.join(workspace, ".git"), { recursive: true });
+ yield* fs.makeDirectory(path.join(tempDir, "other", ".git"), { recursive: true });
+ yield* fs.makeDirectory(otherProject, { recursive: true });
+ yield* fs.makeDirectory(sameRepoProject, { recursive: true });
+ const elsewhereInstall = path.join(configDir, "plugins", "elsewhere");
+ const sameRepoInstall = path.join(configDir, "plugins", "same-repo");
+ yield* writeSkill(path.join(elsewhereInstall, "skills"), "elsewhere", "# Elsewhere");
+ yield* writeSkill(path.join(sameRepoInstall, "skills"), "same-repo", "# Same repo");
+ const records = Array.from({ length: 4 }, () => ({
+ scope: "project",
+ projectPath: otherProject,
+ installPath: elsewhereInstall,
+ }));
+ const plugins = ["a@shop", "b@shop", "c@shop"];