{"record":{"id":"7ccdead152861a4f","repo":"larksuite/cli","slug":"read-suite-skill-md-w","errorCode":null,"errorMessage":"read suite SKILL.md: %w","messagePattern":"read suite SKILL\\.md: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/skillscheck/layout.go","lineNumber":109,"sourceCode":"\t\treturn err\n\t}\n\n\ttargetSet := toSet(target)\n\tremoved := []string{}\n\tfor _, name := range official {\n\t\tif targetSet[name] {\n\t\t\tcontinue\n\t\t}\n\t\tif err := vfs.RemoveAll(filepath.Join(referencesPath, name)); err != nil {\n\t\t\treturn fmt.Errorf(\"remove suite child %s: %w\", name, err)\n\t\t}\n\t\tremoved = append(removed, name)\n\t}\n\n\tskillPath := filepath.Join(suitePath, \"SKILL.md\")\n\traw, err := vfs.ReadFile(skillPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"read suite SKILL.md: %w\", err)\n\t}\n\trendered, err := cropSuiteRoutes(string(raw), removed, target)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := vfs.WriteFile(skillPath, []byte(rendered), 0o644); err != nil {\n\t\treturn fmt.Errorf(\"write cropped suite SKILL.md: %w\", err)\n\t}\n\n\tkept, err := listDirectSubdirs(referencesPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"verify cropped suite: %w\", err)\n\t}\n\treturn assertSameSkillNames(kept, target, \"cropped suite\")\n}\n\nfunc cropSuiteRoutes(content string, removed, target []string) (string, error) {\n\trouteLine := func(name string) *regexp.Regexp {","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/skillscheck/layout.go#L91-L127","documentation":"Wraps vfs.ReadFile failure when the staged suite's SKILL.md cannot be read for route cropping during suite preparation.","triggerScenarios":"Thrown at internal/skillscheck/layout.go:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-download and re-stage the suite archive; report if the official archive ships without SKILL.md"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}