larksuite/cli · error

suite description prefix is missing

Error message

suite description prefix is missing

What it means

cropSuiteRoutes must rewrite the frontmatter description's aggregated keyword list, but the fixed Chinese prefix that anchors the description could not be found in SKILL.md - the archive's description format no longer matches the cropping contract.

Source

Thrown at internal/skillscheck/layout.go:148

	for _, name := range removed {
		line := routeLine(name)
		if len(line.FindAllStringIndex(content, -1)) != 1 {
			return "", fmt.Errorf("suite route for %s is missing or duplicated", name)
		}
		content = line.ReplaceAllString(content, "")
	}

	for _, name := range target {
		if len(routeLine(name).FindAllStringIndex(content, -1)) != 1 {
			return "", fmt.Errorf("cropped suite route for %s is missing or duplicated", name)
		}
	}

	keywords := suiteKeywords(content)
	start := strings.Index(content, suiteDescriptionPrefix)
	if start < 0 {
		return "", fmt.Errorf("suite description prefix is missing")
	}
	valueStart := start + len(suiteDescriptionPrefix)
	valueEndOffset := strings.Index(content[valueStart:], suiteDescriptionSuffix)
	if valueEndOffset < 0 {
		return "", fmt.Errorf("suite description keyword suffix is missing")
	}
	valueEnd := valueStart + valueEndOffset
	content = content[:valueStart] + strings.Join(keywords, "、") + content[valueEnd:]
	return content, nil
}

func suiteKeywords(content string) []string {
	routeLine := regexp.MustCompile(`(?m)^- [^\n(]+(?:(([^)\n]*)))?:`)
	seen := map[string]bool{}
	keywords := []string{}
	for _, match := range routeLine.FindAllStringSubmatch(content, -1) {
		if len(match) < 2 || match[1] == "" {
			continue

View on GitHub (pinned to 7fd6ef3c07)

Solutions

  1. Keep the expected suite description prefix in the archive's SKILL.md
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/skillscheck/layout.go:148 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04). Data as JSON: /api/errors/0711a609cde006b4. Report an issue: GitHub.