affaan-m/ECC · warning

WARN

Error message

WARN: ${msg}

What it means

validate-skills.js reports frontmatter problems in SKILL.md files through reportFrontmatterFinding. In non-strict mode it prints `WARN: <msg>` and increments warnCount; in STRICT mode the same finding becomes `ERROR:` with hasErrors=true and fails the run.

Solutions

  1. Read the message after 'WARN:' — it names the file and the specific frontmatter defect
  2. Fix the SKILL.md frontmatter: add/repair `name:` (must equal the directory name) and an inline `description:` string
  3. Replace literal block scalars (`|`, `|-`) in description with an inline or folded (`>`) scalar
  4. Run the validator again locally (node scripts/ci/validate-skills.js) to confirm zero warnings

Example fix

# before
---
name: my-skill
description: |
  A long description
  spanning lines
---
# after
---
name: my-skill
description: A long description spanning lines
---
Defensive patterns

Strategy: validation

Validate before calling

const fm = matter(fs.readFileSync('skills/my-skill/SKILL.md', 'utf8')).data;
if (fm.name !== 'my-skill') throw new Error('name must match directory');
if (typeof fm.description !== 'string' || !fm.description) throw new Error('description must be an inline string');

Prevention

When it happens

Trigger: validateSkillFile detects a frontmatter issue (e.g. missing `name:` or `description:`, name not matching the directory, description using a literal block scalar `|`) and calls reportFrontmatterFinding(msg) without STRICT enabled (i.e. npm test / CI run in lenient mode).

Common situations: Contributing a new skill with frontmatter that omits required keys; using a YAML literal block for the description (explicitly disallowed by the skill checklist); a name field that doesn't match the directory name.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/8ad7a19470c1b30b. Report an issue: GitHub.

Appendix: source

Thrown at scripts/ci/validate-skills.js:343

function validateSkills() {
  const curatedExists = fs.existsSync(SKILLS_DIR);
  const docsSkillFiles = findDocsSkillFiles(DOCS_DIR);

  if (!curatedExists && docsSkillFiles.length === 0) {
    console.log('No skills directory (skills/ or docs/*/skills/), skipping');
    process.exit(0);
  }

  let hasErrors = false;
  let warnCount = 0;
  let validCount = 0;

  const reportFrontmatterFinding = msg => {
    if (STRICT) {
      console.error(`ERROR: ${msg}`);
      hasErrors = true;
    } else {
      console.warn(`WARN: ${msg}`);
      warnCount++;
    }
  };

  if (curatedExists) {
    const entries = fs.readdirSync(SKILLS_DIR, { withFileTypes: true });
    const dirs = entries.filter(e => e.isDirectory() && !e.name.startsWith('.')).map(e => e.name);

    for (const dir of dirs) {
      const { fatal } = validateSkillDir(dir, SKILLS_DIR, reportFrontmatterFinding);
      if (fatal) {
        hasErrors = true;
        continue;
      }
      validCount++;
    }
  }

View on GitHub (pinned to 8321021c54)