Bläddra i källkod

tweak: load claude skills first so opencode ones override

Aiden Cline 3 månader sedan
förälder
incheckning
dc32eda1e5
1 ändrade filer med 12 tillägg och 12 borttagningar
  1. 12 12
      packages/opencode/src/skill/skill.ts

+ 12 - 12
packages/opencode/src/skill/skill.ts

@@ -66,18 +66,6 @@ export namespace Skill {
       }
     }
 
-    // Scan .opencode/skill/ directories
-    for (const dir of await Config.directories()) {
-      for await (const match of OPENCODE_SKILL_GLOB.scan({
-        cwd: dir,
-        absolute: true,
-        onlyFiles: true,
-        followSymlinks: true,
-      })) {
-        await addSkill(match)
-      }
-    }
-
     // Scan .claude/skills/ directories (project-level)
     const claudeDirs = await Array.fromAsync(
       Filesystem.up({
@@ -104,6 +92,18 @@ export namespace Skill {
       }
     }
 
+    // Scan .opencode/skill/ directories
+    for (const dir of await Config.directories()) {
+      for await (const match of OPENCODE_SKILL_GLOB.scan({
+        cwd: dir,
+        absolute: true,
+        onlyFiles: true,
+        followSymlinks: true,
+      })) {
+        await addSkill(match)
+      }
+    }
+
     return skills
   })