Skip to content

Commit 13194fe

Browse files
committed
fix(web): correct skill detection to look for SKILL.md instead of prompt.md
The Skills page was only showing 4 skills instead of 38 because it was looking for prompt.md files instead of SKILL.md files in the skills directory. Updated the detection logic to check for SKILL.md for skills and prompt.md for agents.
1 parent ed5c3fc commit 13194fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/web-server/shared-routes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ function getSharedItems(type: 'commands' | 'skills' | 'agents'): SharedItem[] {
7575

7676
for (const entry of entries) {
7777
if (entry.isDirectory()) {
78-
// Skill/Agent: look for prompt.md
79-
const promptPath = path.join(sharedDir, entry.name, 'prompt.md');
78+
// Skill/Agent: look for SKILL.md for skills, prompt.md for agents
79+
const markdownFile = type === 'skills' ? 'SKILL.md' : 'prompt.md';
80+
const promptPath = path.join(sharedDir, entry.name, markdownFile);
8081
if (fs.existsSync(promptPath)) {
8182
const content = fs.readFileSync(promptPath, 'utf8');
8283
const description = extractDescription(content);

0 commit comments

Comments
 (0)