{"record":{"id":"a6dfe0466cfc12d7","repo":"alibaba/nacos","slug":"parameter-missing-a6dfe0","errorCode":"PARAMETER_MISSING","errorMessage":"Skill name is required in YAML front matter","messagePattern":"Skill name is required in YAML front matter","errorType":"exception","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"ai/src/main/java/com/alibaba/nacos/ai/utils/SkillZipParser.java","lineNumber":755,"sourceCode":"    private static Skill parseSkillMarkdown(String markdownContent, String namespaceId)\n        throws NacosApiException {\n        Matcher matcher = YAML_FRONT_MATTER.matcher(markdownContent);\n        \n        if (!matcher.matches()) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_VALIDATE_ERROR,\n                \"SKILL.md must contain YAML front matter (---)\");\n        }\n        \n        String yamlContent = matcher.group(1);\n        \n        Map<String, String> yamlMap = parseYamlFrontMatter(yamlContent);\n        \n        String name = yamlMap.get(\"name\");\n        String description = yamlMap.get(\"description\");\n        \n        if (StringUtils.isBlank(name)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Skill name is required in YAML front matter\");\n        }\n        \n        if (StringUtils.isBlank(description)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Skill description is required in YAML front matter\");\n        }\n        \n        if (!SkillRequestUtil.hasNonFrontmatterContent(markdownContent)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Skill markdown body is required\");\n        }\n        \n        Skill skill = new Skill();\n        skill.setNamespaceId(namespaceId);","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/utils/SkillZipParser.java#L737-L773","documentation":"Once front matter matches, a simple line-based YAML reader extracts the top-level key name (keys are case-sensitive). If name is blank, the parser throws PARAMETER_MISSING because every skill needs an identity.","triggerScenarios":"Front matter is present and well-delimited, but the name: line is missing, empty (name:), or keyed with different casing/indentation such as Name:, skillName:, or an indented name.","commonSituations":"Using Name instead of name; indenting name under another key (the reader only treats column-0 keys as top-level for name/description); leaving name: with no value.","solutions":["Add a top-level name: <value> line at column 0 inside the front matter.","Ensure the value after the colon is non-empty.","Check spelling and casing: the key must be exactly name."],"exampleFix":"// before\n---\ndescription: Does things.\n---\n\n// after\n---\nname: my-skill\ndescription: Does things.\n---","handlingStrategy":"validation","validationCode":"// Ensure the front matter has a non-empty lowercase 'name' at column 0\nMap<String,String> fm = SkillZipParser.parseYamlFrontMatterFromMarkdown(md);\nif (StringUtils.isBlank(fm.get(\"name\"))) {\n    throw new IllegalArgumentException(\"Add a top-level 'name:' to SKILL.md front matter\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    skillClient.upload(zipBytes);\n} catch (NacosApiException e) {\n    if (e.getErrorCode() == ErrorCode.PARAMETER_MISSING.getCode()\n            && e.getMessage().contains(\"name\")) {\n        notifyUser(\"SKILL.md is missing the required 'name' field\");\n    }\n    throw e;\n}","preventionTips":["Keep a checklist of required keys (name, description) and validate before upload.","Remember keys are case-sensitive: use lowercase name.","Place name at column 0, not nested under another key."],"tags":["skill","yaml","validation","ai"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}