{"record":{"id":"83814cd369d1ffcc","repo":"alibaba/nacos","slug":"parameter-missing-83814c","errorCode":"PARAMETER_MISSING","errorMessage":"Skill name is required","messagePattern":"Skill name is required","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"warning","filePath":"ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java","lineNumber":185,"sourceCode":"        AiResourceIndexMaintenanceService resourceIndexMaintenanceService) {\n        if (resourceIndexMaintenanceService != null) {\n            this.resourceIndexMaintenanceService = resourceIndexMaintenanceService;\n        }\n    }\n    \n    /**\n     * Upload a skill from a ZIP archive.\n     *\n     * <p>Flow: parse ZIP -> validate name -> resolve version -> check existing meta.\n     * If overwrite=true, replaces the current editing draft or creates a new one.\n     * If overwrite=false, fails when a working version (editing/reviewing) already exists.</p>\n     */\n    @Override\n    public String uploadSkillFromZip(SkillUploadRequest request) throws NacosException {\n        Skill skill = SkillZipParser.parseSkillFromZip(request.getZipBytes(),\n            request.getNamespaceId());\n        if (skill == null || StringUtils.isBlank(skill.getName())) {\n            throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,\n                \"Skill name is required\");\n        }\n        List<UploadVersionCandidate> uploadVersions = resolveUploadVersionCandidates(skill,\n            request.getTargetVersion());\n        return doUploadSingleSkill(request.getNamespaceId(), skill, uploadVersions,\n            request.isOverwrite(), request.getUploadAction(), request.getCommitMsg());\n    }\n    \n    @Override\n    public List<SkillUploadPrecheckResult> precheckUploadSkillFromZip(String namespaceId,\n        byte[] zipBytes) throws NacosException {\n        SkillZipParser.MultiSkillParseResult parseResult =\n            SkillZipParser.parseMultipleSkillsFromZip(zipBytes, namespaceId);\n        List<SkillUploadPrecheckResult> results = new ArrayList<>(\n            parseResult.getFailures().size() + parseResult.getSkills().size());\n        for (SkillZipParser.ParseFailure failure : parseResult.getFailures()) {\n            results.add(buildPrecheckParseFailureResult(namespaceId, failure));\n        }","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java#L167-L203","documentation":"An INVALID_PARAM (HTTP 400, ErrorCode PARAMETER_MISSING/10000) from uploadSkillFromZip: after parsing the ZIP, the resulting Skill is null or its name is blank. The skill name is read from the YAML front-matter of SKILL.md (the name: key); if the front-matter omits name or the ZIP is malformed so parsing yields null, the upload is rejected before any storage write.","triggerScenarios":"Uploading a single-skill ZIP whose SKILL.md front-matter has no name: key, or a ZIP so malformed that SkillZipParser.parseSkillFromZip returns null.","commonSituations":"Hand-authored SKILL.md missing the name field; using a plain markdown file instead of a proper skill ZIP; an older skill format that put the name elsewhere; ZIP built without the expected entry layout.","solutions":["Open the ZIP, edit SKILL.md front-matter to include 'name: <skill-name>' (and 'description:'), then re-zip and re-upload.","Verify the ZIP contains a SKILL.md entry at the expected location.","Run precheckUploadSkillFromZip first to surface the parse problem before attempting the real upload."],"exampleFix":"// before — SKILL.md front-matter missing name\n---\ndescription: A weather tool\n---\n\n// after\n---\nname: weather-tool\ndescription: A weather tool\n---","handlingStrategy":"validation","validationCode":"// Parse locally and assert the name is present before uploading.\nSkill parsed = SkillZipParser.parseSkillFromZip(zipBytes, ns);\nif (parsed == null || StringUtils.isBlank(parsed.getName())) {\n    // fix SKILL.md front-matter (add 'name:') before retrying\n    return;\n}\nskillOp.uploadSkillFromZip(req);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include 'name:' and 'description:' in SKILL.md YAML front-matter.","Run precheckUploadSkillFromZip before the real upload to catch missing fields.","Build ZIPs with the expected SKILL.md entry layout."],"tags":["upload","skill","parameter-missing","yaml","frontmatter"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}