skills readme was getting junk files (#967)

This commit is contained in:
Aaron Powell
2026-03-11 10:44:46 +11:00
committed by GitHub
parent 52dd53d3a3
commit f12b83cf1b
2 changed files with 5 additions and 4 deletions

View File

@@ -145,10 +145,11 @@ function parseSkillMetadata(skillPath) {
// List bundled assets (all files except SKILL.md), recursing through subdirectories
const getAllFiles = (dirPath, arrayOfFiles = []) => {
const files = fs.readdirSync(dirPath);
const assetPaths = ['references', 'assets', 'scripts'];
files.forEach((file) => {
const filePath = path.join(dirPath, file);
if (fs.statSync(filePath).isDirectory()) {
if (fs.statSync(filePath).isDirectory() && assetPaths.includes(file)) {
arrayOfFiles = getAllFiles(filePath, arrayOfFiles);
} else {
const relativePath = path.relative(skillPath, filePath);