Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): discover skills from installed plugins #6453

ClosedMoinax(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/6453/headopened View on GitHub

Showing 3 changed files with 178 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
178 additions and 0 deletionsapps/server/src/provider/Drivers/ClaudeSkills.test.tsModified
View file
@@ -301,4 +301,182 @@
assert.deepEqual(skills, []);
}),
+​
+ it.effect("names installed plugin skills `<plugin>:<skill>` across all three layouts", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const tempDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-claude-skills-" });
+ const configDir = path.join(tempDir, "claude-home");
+ const pluginsDir = path.join(configDir, "plugins");
+​
+ // Layout 1: a cached install, addressed by `installPath`.
+ const cached = path.join(pluginsDir, "cache", "shop", "cached", "1.0.0");
+ yield* writeSkill(path.join(cached, "skills"), "build", "---\nname: build\n---\n");
+​
+ // Layout 2: a plugin inside a marketplace checkout. The stale
+ // `installPath` left behind still exists and still has a `skills`
+ // directory — it just holds no skill, so the search must go on.
+ const shop = path.join(pluginsDir, "marketplaces", "shop");
+ yield* writeSkill(path.join(shop, "plugins", "nested", "skills"), "ship", "---\n---\n");
+ yield* fs.makeDirectory(path.join(tempDir, "stale", "skills", "leftover"), {
+ recursive: true,
+ });
+​
+ // Layout 3: a marketplace whose root *is* the plugin.
+ const flat = path.join(pluginsDir, "marketplaces", "flat");
+ yield* writeSkill(path.join(flat, "skills"), "audit", "---\nname: audit\n---\n");
+​