{"record":{"id":"21bbce4bad0c6f6f","repo":"larksuite/cli","slug":"skill-s-is-not-a-complete-v0-2-archive-entry","errorCode":null,"errorMessage":"skill %s is not a complete v0.2 archive entry","messagePattern":"skill (.+?) is not a complete v0\\.2 archive entry","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/skillscheck/sync.go","lineNumber":117,"sourceCode":"\t\tDigest string `json:\"digest\"`\n\t}\n\ttype officialIndex struct {\n\t\tSkills []officialSkill `json:\"skills\"`\n\t}\n\n\tvar index officialIndex\n\tif err := json.Unmarshal([]byte(text), &index); err != nil {\n\t\treturn nil, err\n\t}\n\n\tseen := map[string]bool{}\n\tfor _, skill := range index.Skills {\n\t\tcandidate := strings.TrimSpace(skill.Name)\n\t\tif !skillNamePattern.MatchString(candidate) {\n\t\t\treturn nil, fmt.Errorf(\"invalid skill name %q\", candidate)\n\t\t}\n\t\tif skill.Type != \"archive\" || strings.TrimSpace(skill.URL) == \"\" || !digestPattern.MatchString(skill.Digest) {\n\t\t\treturn nil, fmt.Errorf(\"skill %s is not a complete v0.2 archive entry\", candidate)\n\t\t}\n\t\tif seen[candidate] {\n\t\t\treturn nil, fmt.Errorf(\"duplicate skill %s\", candidate)\n\t\t}\n\t\tseen[candidate] = true\n\t}\n\n\treturn sortedKeys(seen), nil\n}\n\n// parseGlobalSkillsList parses the output of \"npx -y skills ls -g\"\nfunc parseGlobalSkillsList(lines []string) []string {\n\tseen := map[string]bool{}\n\n\tfor _, line := range lines {\n\t\ttrimmed := strings.TrimSpace(line)\n\n\t\t// Skip header","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/skillscheck/sync.go#L99-L135","documentation":"ParseOfficialSkillsIndexJSON requires every skill entry to be a complete v0.2 archive entry: type must be \"archive\", URL non-empty, and digest matching digestPattern. Any entry failing these checks aborts the whole index parse with this error.","triggerScenarios":"fetchOfficialSkills parsing an index where a skill entry has type != \"archive\", an empty/whitespace URL, or a digest not matching digestPattern (e.g. missing sha256 hex hash).","commonSituations":"Upstream index lists a non-archive entry type (e.g. \"directory\" or new format the CLI doesn't support); a mirrored/truncated index lost URL or digest fields; a newer index schema version with different field semantics than the parser's v0.2 expectations.","solutions":["Ensure each entry has `type: \"archive\"`, a non-empty `url`, and a valid digest (e.g. sha256:<64 hex chars>)","Check the index format version; upgrade the CLI if the upstream index moved past v0.2","Verify the index source URL is the official one, not a partial cache or mirror","Regenerate the index with all required archive fields populated"],"exampleFix":"// before\n{\"name\": \"crm-sync\", \"type\": \"directory\", \"url\": \"\", \"digest\": \"abc123\"}\n// after\n{\"name\": \"crm-sync\", \"type\": \"archive\", \"url\": \"https://.../crm-sync.tgz\", \"digest\": \"sha256:<64 hex chars>\"}","handlingStrategy":"validation","validationCode":"var idx struct{ Skills []struct{ Type, URL, Digest string } `json:\"skills\"` } `json:\"skills\"`\nif err := json.Unmarshal(indexData, &idx); err == nil {\n    for _, s := range idx.Skills {\n        if s.Type != \"archive\" || strings.TrimSpace(s.URL) == \"\" || len(s.Digest) < 64 {\n            // entry is not a complete v0.2 archive entry; fix before parsing\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"skills, err := skillscheck.ParseOfficialSkillsIndexJSON(data)\nif err != nil {\n    if strings.Contains(err.Error(), \"not a complete v0.2 archive entry\") {\n        // log which index version/source was used; refresh or downgrade index\n    }\n    return err\n}","preventionTips":["Always publish entries with type \"archive\", a real URL, and a full sha256 digest","Check the index format version before pointing the CLI at a new source","Avoid truncated mirrors/caches that drop optional-looking fields","Keep the CLI in sync with the current index schema version"],"tags":["validation","json","skills-index","integrity"],"backgroundTag":"schema-validation-failed","analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}