Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(cursor): discover symlinked skills as package boundaries #9420

MergedEzraBuild(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/9420/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 64 additions and 9 deletions.

x
0 of 2 viewed, 2 left
14 additions and 9 deletionsapps/server/src/provider/Drivers/CursorSkills.tsModified
View file
@@ -147,16 +147,18 @@
if (!resolvedDirectory) {
return;
- if (
- visitedDirectories.has(resolvedDirectory) ||
- (resolvedDirectory !== rootDirectory &&
- !resolvedDirectory.startsWith(`${rootDirectory}${path.sep}`))
- ) {
+ if (visitedDirectories.has(resolvedDirectory)) {
return;
visitedDirectories.add(resolvedDirectory);
+ // A symlink whose target lives outside the root is a skill package
+ // boundary: read its own SKILL.md so linked skill libraries show up, but
+ // never walk the target tree.
+ const insideRoot =
+ resolvedDirectory === rootDirectory ||
+ resolvedDirectory.startsWith(`${rootDirectory}${path.sep}`);
​
- const skillPath = path.join(resolvedDirectory, "SKILL.md");
+ const skillPath = path.join(directory, "SKILL.md");
const skillInfo = yield* orUndefined(fileSystem.stat(skillPath), input.budget);
if (skillInfo?.type === "File") {
let frontmatter: CursorSkillFrontmatter | undefined = { cliVisible: true };
@@ -167,7 +169,7 @@
frontmatter = parseSkillFrontmatter(contents);