{"record":{"id":"0a75db64305c22b6","repo":"Yeachan-Heo/oh-my-codex","slug":"catalog-manifest-invalid-skills-index","errorCode":null,"errorMessage":"catalog_manifest_invalid:skills[${index}]","messagePattern":"catalog_manifest_invalid:skills\\[(.+?)\\]","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/catalog/schema.ts","lineNumber":57,"sourceCode":"    throw new Error(`catalog_manifest_invalid:${field}`);\n  }\n}\n\nexport function validateCatalogManifest(input: unknown): CatalogManifest {\n  if (!isObject(input)) throw new Error('catalog_manifest_invalid:root');\n\n  if (typeof input.schemaVersion !== 'number' || !Number.isInteger(input.schemaVersion)) {\n    throw new Error('catalog_manifest_invalid:schemaVersion');\n  }\n\n  assertNonEmptyString(input.catalogVersion, 'catalogVersion');\n\n  if (!Array.isArray(input.skills)) throw new Error('catalog_manifest_invalid:skills');\n  if (!Array.isArray(input.agents)) throw new Error('catalog_manifest_invalid:agents');\n\n  const seenSkills = new Set<string>();\n  const skills: CatalogSkillEntry[] = input.skills.map((entry, index) => {\n    if (!isObject(entry)) throw new Error(`catalog_manifest_invalid:skills[${index}]`);\n    assertNonEmptyString(entry.name, `skills[${index}].name`);\n    assertNonEmptyString(entry.category, `skills[${index}].category`);\n    assertNonEmptyString(entry.status, `skills[${index}].status`);\n\n    if (!SKILL_CATEGORIES.has(entry.category as CatalogSkillCategory)) {\n      throw new Error(`catalog_manifest_invalid:skills[${index}].category`);\n    }\n    if (!ENTRY_STATUSES.has(entry.status as CatalogEntryStatus)) {\n      throw new Error(`catalog_manifest_invalid:skills[${index}].status`);\n    }\n\n    const name = entry.name.trim();\n    if (seenSkills.has(name)) throw new Error(`catalog_manifest_invalid:duplicate_skill:${name}`);\n    seenSkills.add(name);\n\n    const canonical = typeof entry.canonical === 'string' && entry.canonical.trim() !== ''\n      ? entry.canonical.trim()\n      : undefined;","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/catalog/schema.ts#L39-L75","documentation":"Each element of the skills array must be a plain JSON object; this error names the index of the first entry that is not (a string, number, null, or array). It fires during the per-entry mapping loop in validateCatalogManifest.","triggerScenarios":"A skills array containing a bare string like \"autopilot\" or a null at the reported index.","commonSituations":"Shorthand manifests listing skill names as strings, or trailing commas/nulls introduced by manual edits.","solutions":["Replace the offending element with a full entry object {name, category, status}","Regenerate the manifest","Use the JSON schema/tooling rather than editing arrays by hand"],"exampleFix":"// before\n\"skills\": [\"autopilot\"]\n\n// after\n\"skills\": [ { \"name\": \"autopilot\", \"category\": \"execution\", \"status\": \"active\" } ]","handlingStrategy":"validation","validationCode":"if (!raw.skills.every((s: unknown) => typeof s === 'object' && s !== null && !Array.isArray(s))) { /* fix entries */ }","typeGuard":"const isEntry = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);","tryCatchPattern":null,"preventionTips":["Never use shorthand string entries in skills","Schema-check the manifest during build"],"tags":["catalog","manifest","validation","skills"],"backgroundTag":"schema-validation-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}