MCPcopy Create free account
hub / github.com/TencentEdgeOne/edgeone-makers-tools / validate

Function validate

scripts/build.mjs:52–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 const content = readSkillMd(skill);
51 if (!content) continue;
52 const outPath = path.join(CODEX_DIR, `${skill}.md`);
53 fs.writeFileSync(outPath, content);
54 console.log(` → ${outPath}`);
55 }
56}
57
58// Validate
59function validate() {
60 const errors = [];
61 for (const skill of getSkillDirs()) {
62 const content = readSkillMd(skill);
63 if (!content) {
64 errors.push(`${skill}: missing SKILL.md`);
65 continue;
66 }
67 if (!content.startsWith('---')) {
68 errors.push(`${skill}: missing frontmatter`);
69 }
70 if (!content.includes('name:')) {
71 errors.push(`${skill}: missing name in frontmatter`);

Callers 1

build.mjsFile · 0.85

Calls 2

getSkillDirsFunction · 0.85
readSkillMdFunction · 0.85

Tested by

no test coverage detected