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.
This commit is contained in:
kaitranntt
2025-12-08 16:14:30 -05:00
parent ed5c3fc83a
commit 13194fecbe
+3 -2
View File
@@ -75,8 +75,9 @@ function getSharedItems(type: 'commands' | 'skills' | 'agents'): SharedItem[] {
for (const entry of entries) {
if (entry.isDirectory()) {
// Skill/Agent: look for prompt.md
const promptPath = path.join(sharedDir, entry.name, 'prompt.md');
// Skill/Agent: look for SKILL.md for skills, prompt.md for agents
const markdownFile = type === 'skills' ? 'SKILL.md' : 'prompt.md';
const promptPath = path.join(sharedDir, entry.name, markdownFile);
if (fs.existsSync(promptPath)) {
const content = fs.readFileSync(promptPath, 'utf8');
const description = extractDescription(content);