{"record":{"id":"278f98f37c0a397f","repo":"davila7/claude-code-templates","slug":"error-loading-skill-skilldir","errorCode":null,"errorMessage":"  ⚠ Error loading skill ${skillDir}:","messagePattern":"  ⚠ Error loading skill (.+?):","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/skill-dashboard.js","lineNumber":93,"sourceCode":"            console.log(chalk.gray(`  ⊘ Skipping non-directory: ${skillDir}`));\n            continue;\n          }\n\n          // Look for SKILL.md\n          const skillMdPath = path.join(skillPath, 'SKILL.md');\n\n          if (await fs.pathExists(skillMdPath)) {\n            console.log(chalk.gray(`  ✓ Found SKILL.md in ${skillDir}`));\n            const skillData = await this.parseSkill(skillMdPath, skillPath, skillDir, source);\n            if (skillData) {\n              skills.push(skillData);\n              console.log(chalk.green(`  ✅ Loaded skill: ${skillData.name}`));\n            }\n          } else {\n            console.log(chalk.gray(`  ⊘ No SKILL.md in ${skillDir}`));\n          }\n        } catch (error) {\n          console.warn(chalk.yellow(`  ⚠ Error loading skill ${skillDir}:`), error.message);\n        }\n      }\n\n      return skills;\n    } catch (error) {\n      console.warn(chalk.yellow(`Warning: Error loading skills from ${skillsDir}:`), error.message);\n      return skills;\n    }\n  }\n\n  async loadPluginSkills() {\n    const skills = [];\n    const pluginsDir = path.join(this.claudeDir, 'plugins', 'marketplaces');\n\n    try {\n      if (!(await fs.pathExists(pluginsDir))) {\n        console.log(chalk.gray(`  ℹ Plugins directory does not exist: ${pluginsDir}`));\n        return skills;","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/skill-dashboard.js#L75-L111","documentation":"loadSkillsFromDirectory iterates skill directories and parses each SKILL.md; this inner warning fires when one specific skill directory fails (missing/unreadable SKILL.md despite passing an existence check, YAML frontmatter that throws, fs.stat failure). Only that skill is skipped — the loop continues and other skills still load.","triggerScenarios":"Calling loadSkillsFromDirectory on a skills dir where one subdirectory contains a SKILL.md that is unreadable (permissions), is a broken symlink, has frontmatter yaml.load throws on (e.g. duplicate keys with certain yaml lib configs), or where fs.stat/readFile race with the file being deleted mid-scan.","commonSituations":"A skill was partially installed or uninstalled while the dashboard was loading; broken symlinks in a dotfile-managed skills directory; SKILL.md with invalid YAML frontmatter (tabs, unquoted special characters); skills dir synced from another OS with lost read permissions.","solutions":["Identify the named skillDir from the warning and run `cat <skillDir>/SKILL.md` to confirm readability","Validate the frontmatter YAML: extract the --- block and parse it with `yq` or a YAML linter","Reinstall the skill or remove the broken directory so the scan is clean","Fix permissions/symlinks (`ls -la`, `chmod -R u+r`) if the file exists but cannot be read"],"exampleFix":"# before\n---\nname:\tmy-skill   # tab, unquoted colon issues\n---\n# after\n---\nname: my-skill\n---","handlingStrategy":"try-catch","validationCode":"const fm = fs.readFileSync(skillMd, 'utf8').match(/^---\\n[\\s\\S]*?\\n---\\n/);\nif (!fm) { /* skip skill, no frontmatter to parse */ }","typeGuard":null,"tryCatchPattern":"catch (error) {\n  console.warn(`Skipping skill ${skillDir}: ${error.message}`);\n  continue; // per-skill failure must not abort the directory scan\n}","preventionTips":["Lint SKILL.md frontmatter with yq in CI","Avoid tabs and unquoted colons in frontmatter","Install/uninstall skills via the CLI, not manual file moves"],"tags":["skills","yaml-frontmatter","filesystem","claude-code"],"backgroundTag":"skill-parsing-failed","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}