{"record":{"id":"8ad7a19470c1b30b","repo":"affaan-m/ECC","slug":"warn-msg","errorCode":null,"errorMessage":"WARN: ${msg}","messagePattern":"WARN: \\$\\{msg\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"scripts/ci/validate-skills.js","lineNumber":343,"sourceCode":"function validateSkills() {\n  const curatedExists = fs.existsSync(SKILLS_DIR);\n  const docsSkillFiles = findDocsSkillFiles(DOCS_DIR);\n\n  if (!curatedExists && docsSkillFiles.length === 0) {\n    console.log('No skills directory (skills/ or docs/*/skills/), skipping');\n    process.exit(0);\n  }\n\n  let hasErrors = false;\n  let warnCount = 0;\n  let validCount = 0;\n\n  const reportFrontmatterFinding = msg => {\n    if (STRICT) {\n      console.error(`ERROR: ${msg}`);\n      hasErrors = true;\n    } else {\n      console.warn(`WARN: ${msg}`);\n      warnCount++;\n    }\n  };\n\n  if (curatedExists) {\n    const entries = fs.readdirSync(SKILLS_DIR, { withFileTypes: true });\n    const dirs = entries.filter(e => e.isDirectory() && !e.name.startsWith('.')).map(e => e.name);\n\n    for (const dir of dirs) {\n      const { fatal } = validateSkillDir(dir, SKILLS_DIR, reportFrontmatterFinding);\n      if (fatal) {\n        hasErrors = true;\n        continue;\n      }\n      validCount++;\n    }\n  }\n","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/validate-skills.js#L325-L361","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Read the message after 'WARN:' — it names the file and the specific frontmatter defect","Fix the SKILL.md frontmatter: add/repair `name:` (must equal the directory name) and an inline `description:` string","Replace literal block scalars (`|`, `|-`) in description with an inline or folded (`>`) scalar","Run the validator again locally (node scripts/ci/validate-skills.js) to confirm zero warnings"],"exampleFix":"# before\n---\nname: my-skill\ndescription: |\n  A long description\n  spanning lines\n---\n# after\n---\nname: my-skill\ndescription: A long description spanning lines\n---","handlingStrategy":"validation","validationCode":"const fm = matter(fs.readFileSync('skills/my-skill/SKILL.md', 'utf8')).data;\nif (fm.name !== 'my-skill') throw new Error('name must match directory');\nif (typeof fm.description !== 'string' || !fm.description) throw new Error('description must be an inline string');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the SKILL.md template from CONTRIBUTING.md for every new skill","Keep description an inline or folded (>) scalar, never a literal block","Keep name: identical to the directory name","Run the skills validator locally before opening a PR"],"tags":["ci","yaml","frontmatter","validation","skills"],"backgroundTag":"schema-validation-failed","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}