davila7/claude-code-templates · warning

Warning: Error parsing skill ${skillDirName}

Error message

Warning: Error parsing skill ${skillDirName}

What it means

parseSkill failed while reading or parsing a skill directory's SKILL.md, so it returns null and that skill is skipped from the skill dashboard. It is a non-fatal warning: the catch logs the error message and continues with the remaining skills.

Source

Thrown at cli-tool/src/skill-dashboard.js:214

      const categorizedFiles = this.categorizeFiles(supportingFiles, markdownContent);

      return {
        name: frontmatter.name || skillDirName,
        description: frontmatter.description || 'No description available',
        allowedTools: frontmatter['allowed-tools'] || frontmatter.allowedTools || null,
        source,
        path: skillPath,
        mainFile: 'SKILL.md',
        mainFilePath: skillMdPath,
        mainFileSize: this.formatFileSize(stats.size),
        lastModified: stats.mtime,
        fileCount: supportingFiles.length + 1, // +1 for SKILL.md
        supportingFiles: categorizedFiles,
        rawContent: content,
        markdownContent
      };
    } catch (error) {
      console.warn(chalk.yellow(`Warning: Error parsing skill ${skillDirName}`), error.message);
      return null;
    }
  }

  async scanSupportingFiles(skillPath) {
    const files = [];
    const self = this; // Preserve 'this' context

    async function scanDirectory(dir, relativePath = '') {
      const entries = await fs.readdir(dir);

      for (const entry of entries) {
        const fullPath = path.join(dir, entry);
        const relPath = relativePath ? path.join(relativePath, entry) : entry;

        try {
          const stat = await fs.stat(fullPath);

View on GitHub (pinned to a0851ed10c)

Solutions

  1. Verify the skill directory actually contains a readable SKILL.md
  2. Check the logged error.message for the root cause (ENOENT vs EACCES vs parse)
  3. Fix permissions (chmod) or restore/remove the broken skill directory
  4. Re-run the dashboard and confirm the skill appears

Example fix

# before
my-skill/
  notes.md
# after (add SKILL.md with frontmatter)
my-skill/
  SKILL.md
  notes.md
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs/promises');
async function skillIsParseable(dir) {
  const md = path.join(dir, 'SKILL.md');
  try { await fs.access(md, fs.constants.R_OK); return true; } catch { return false; }
}

Try / catch

try { const s = await parseSkill(dir); if (!s) console.warn(`skipped ${dir}`); } catch (e) { /* parseSkill already catches; handle null */ }

Prevention

When it happens

Trigger: SKILL.md missing, unreadable (permissions), not valid UTF-8, or the file-read/frontmatter-extraction code inside the try block throws; also I/O races if the skill directory is deleted while scanning.

Common situations: Skill directory exists but SKILL.md was renamed or is empty; permissions issues; partially synced/edited skill folders; symlinks pointing to nonexistent targets.

Related errors


AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28). Data as JSON: /api/errors/8a4ba2ed97f20a64. Report an issue: GitHub.