larksuite/cli · error

read suite SKILL.md: %w

Error message

read suite SKILL.md: %w

What it means

Wraps vfs.ReadFile failure when the staged suite's SKILL.md cannot be read for route cropping during suite preparation.

Source

Thrown at internal/skillscheck/layout.go:109

		return err
	}

	targetSet := toSet(target)
	removed := []string{}
	for _, name := range official {
		if targetSet[name] {
			continue
		}
		if err := vfs.RemoveAll(filepath.Join(referencesPath, name)); err != nil {
			return fmt.Errorf("remove suite child %s: %w", name, err)
		}
		removed = append(removed, name)
	}

	skillPath := filepath.Join(suitePath, "SKILL.md")
	raw, err := vfs.ReadFile(skillPath)
	if err != nil {
		return fmt.Errorf("read suite SKILL.md: %w", err)
	}
	rendered, err := cropSuiteRoutes(string(raw), removed, target)
	if err != nil {
		return err
	}
	if err := vfs.WriteFile(skillPath, []byte(rendered), 0o644); err != nil {
		return fmt.Errorf("write cropped suite SKILL.md: %w", err)
	}

	kept, err := listDirectSubdirs(referencesPath)
	if err != nil {
		return fmt.Errorf("verify cropped suite: %w", err)
	}
	return assertSameSkillNames(kept, target, "cropped suite")
}

func cropSuiteRoutes(content string, removed, target []string) (string, error) {
	routeLine := func(name string) *regexp.Regexp {

View on GitHub (pinned to 7fd6ef3c07)

Solutions

  1. Re-download and re-stage the suite archive; report if the official archive ships without SKILL.md
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/skillscheck/layout.go:109 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/7ccdead152861a4f. Report an issue: GitHub.