fix: improve security-review skill discovery (#1515)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Gordon Lam
2026-04-29 10:15:27 +08:00
committed by GitHub
parent 689ac4d33c
commit ae2c51d9cc

View File

@@ -430,14 +430,25 @@ function generateSkillsData(gitDates) {
// Get last updated from SKILL.md file // Get last updated from SKILL.md file
const skillFilePath = `${relativePath}/SKILL.md`; const skillFilePath = `${relativePath}/SKILL.md`;
const title = metadata.name
.split("-")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ");
const searchText = [
title,
metadata.description,
folder,
metadata.name,
relativePath,
category,
]
.join(" ")
.toLowerCase();
skills.push({ skills.push({
id: folder, id: folder,
name: metadata.name, name: metadata.name,
title: metadata.name title,
.split("-")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" "),
description: metadata.description, description: metadata.description,
assets: metadata.assets, assets: metadata.assets,
hasAssets: metadata.assets.length > 0, hasAssets: metadata.assets.length > 0,
@@ -447,6 +458,7 @@ function generateSkillsData(gitDates) {
skillFile: skillFilePath, skillFile: skillFilePath,
files: files, files: files,
lastUpdated: gitDates.get(skillFilePath) || null, lastUpdated: gitDates.get(skillFilePath) || null,
searchText,
}); });
} }
} }
@@ -774,7 +786,7 @@ function generateSearchIndex(
description: skill.description, description: skill.description,
path: skill.skillFile, path: skill.skillFile,
lastUpdated: skill.lastUpdated, lastUpdated: skill.lastUpdated,
searchText: `${skill.title} ${skill.description}`.toLowerCase(), searchText: skill.searchText,
}); });
} }