{"record":{"id":"f4955638dde6f662","repo":"davila7/claude-code-templates","slug":"warning-error-loading-plugin-skills","errorCode":null,"errorMessage":"Warning: Error loading plugin skills:","messagePattern":"Warning: Error loading plugin skills:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/skill-dashboard.js","lineNumber":166,"sourceCode":"            }\n\n            const skillMdPath = path.join(skillPath, 'SKILL.md');\n\n            if (await fs.pathExists(skillMdPath)) {\n              console.log(chalk.gray(`  ✓ Found plugin skill: ${skillDir} from ${marketplace}`));\n              const skillData = await this.parseSkill(skillMdPath, skillPath, skillDir, 'Plugin');\n              if (skillData) {\n                skills.push(skillData);\n                console.log(chalk.green(`  ✅ Loaded plugin skill: ${skillData.name}`));\n              }\n            }\n          }\n        }\n      }\n\n      return skills;\n    } catch (error) {\n      console.warn(chalk.yellow(`Warning: Error loading plugin skills:`), error.message);\n      return skills;\n    }\n  }\n\n  async parseSkill(skillMdPath, skillPath, skillDirName, source) {\n    try {\n      const content = await fs.readFile(skillMdPath, 'utf8');\n\n      // Parse YAML frontmatter\n      const frontmatterMatch = content.match(/^---\\n([\\s\\S]*?)\\n---/);\n      let frontmatter = {};\n      let markdownContent = content;\n\n      if (frontmatterMatch) {\n        try {\n          frontmatter = yaml.load(frontmatterMatch[1]);\n          markdownContent = content.substring(frontmatterMatch[0].length).trim();\n        } catch (error) {","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/skill-dashboard.js#L148-L184","documentation":"loadPluginSkills scans installed plugins for bundled skills and warns when the overall scan fails — plugin registry malformed, a plugin directory unexpectedly missing, or YAML/JSON parse errors at the plugin level. It is the plugin-skills counterpart of the directory scan and similarly returns a possibly-empty array on failure.","triggerScenarios":"Calling loadPluginSkills when the installed-plugins registry or a plugin's manifest is invalid JSON/YAML, when a registered plugin's directory has been deleted without uninstalling, or when a plugin's skills subfolder violates expected structure.","commonSituations":"Plugin uninstalled by deleting its folder manually, leaving a stale registry entry; plugin manifest edited by hand and corrupted; version change in plugin manifest schema.","solutions":["Check the plugin registry / installed-plugins listing for entries pointing at non-existent directories and remove them","Reinstall or cleanly uninstall broken plugins so manifests and folders are consistent","Validate each plugin manifest (`jq .` for JSON, `yq` for YAML) in the plugins directory","Re-run the skill dashboard to confirm plugin skills load"],"exampleFix":"# before\n# registry lists plugins/my-plugin but folder was rm -rf'd\n# after\nclaude plugin uninstall my-plugin   # or remove the stale registry entry\n","handlingStrategy":"validation","validationCode":"async function pluginEntryOk(plugin) {\n  if (!(await fs.pathExists(plugin.path))) return false;\n  try { JSON.parse(await fs.readFile(path.join(plugin.path, '.claude-plugin', 'plugin.json'), 'utf8')); return true; }\n  catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"catch (error) {\n  console.warn(`Plugin skills scan failed: ${error.message}`);\n  return skills;\n}","preventionTips":["Always uninstall plugins via the CLI to keep the registry consistent","Validate plugin manifests in plugin CI","Prune registry entries whose directories no longer exist before scanning"],"tags":["plugin","skills","registry","json-parse"],"backgroundTag":"plugin-registry-stale","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}