{"record":{"id":"376e5634536baa18","repo":"davila7/claude-code-templates","slug":"warning-error-scanning-skill-directory-skillpat","errorCode":null,"errorMessage":"Warning: Error scanning skill directory ${skillPath}","messagePattern":"Warning: Error scanning skill directory (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/skill-dashboard.js","lineNumber":254,"sourceCode":"            files.push({\n              name: entry,\n              path: fullPath,\n              relativePath: relPath,\n              size: stat.size,\n              isDirectory: false,\n              type: self.getFileType(entry) // Use self instead of this\n            });\n          }\n        } catch (error) {\n          // Skip files we can't read\n        }\n      }\n    }\n\n    try {\n      await scanDirectory(skillPath);\n    } catch (error) {\n      console.warn(chalk.yellow(`Warning: Error scanning skill directory ${skillPath}`), error.message);\n    }\n\n    return files;\n  }\n\n  categorizeFiles(files, markdownContent) {\n    const categorized = {\n      alwaysLoaded: ['SKILL.md'],\n      onDemand: [],\n      progressive: []\n    };\n\n    // Parse referenced files from markdown content\n    const referencedFiles = this.extractReferencedFiles(markdownContent);\n\n    for (const file of files) {\n      const ext = path.extname(file.name).toLowerCase();\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/skill-dashboard.js#L236-L272","documentation":"scanSupportingFiles catches any error thrown while recursively walking a skill directory and returns whatever files were collected so far. It means the directory walk (readdir/stat on entries) failed partway through.","triggerScenarios":"A subdirectory or file inside the skill folder is deleted mid-scan, has restrictive permissions, is a broken symlink, or readdir fails on a deeply nested path (EMOULINK/ENOENT/EACCES).","commonSituations":"Editor or sync tool modifying the skill folder during scan; read-only mounts; broken symlinks in skill assets.","solutions":["Check permissions on the skill directory tree (ls -la, chmod -R)","Remove broken symlinks or stale temp files inside the skill folder","Re-run the scan when no other process is writing to the folder"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const ok = await fs.pathExists(skillPath).catch(() => false);\nif (!ok) return [];","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid editing skill folders while the dashboard scans them","Fix permissions and remove broken symlinks in skill directories"],"tags":["filesystem","recursion","scan"],"backgroundTag":"directory-scan-failed","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}