larksuite/cli · error

inspect suite archive: %w

Error message

inspect suite archive: %w

What it means

prepareSuite could not list the staged archive's references/ subdirectories (via listDirectSubdirs), so the crop cannot know which child skills exist; wraps the underlying IO error and implies a broken archive layout.

Source

Thrown at internal/skillscheck/layout.go:88

	suitePath := filepath.Join(stagingRoot, ".agents", "skills", "lark-suite")
	if err := prepareSuite(suitePath, plan.OfficialSkills, plan.ToUpdate); err != nil {
		return err
	}
	installResult := runner.InstallLocalSuite(suitePath)
	if installResult == nil || installResult.Err != nil {
		return fmt.Errorf("install cropped lark-suite failed: %s", resultDetail(installResult))
	}
	if err := removeSkills(runner, installedSeparate); err != nil {
		return err
	}
	return nil
}

func prepareSuite(suitePath string, official, target []string) error {
	referencesPath := filepath.Join(suitePath, "references")
	archived, err := listDirectSubdirs(referencesPath)
	if err != nil {
		return fmt.Errorf("inspect suite archive: %w", err)
	}
	if err := assertSameSkillNames(archived, official, "suite archive"); err != nil {
		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")

View on GitHub (pinned to 7fd6ef3c07)

Solutions

  1. Verify the suite archive layout (references/ with skill subdirectories) and re-stage
Defensive patterns

Strategy: validation

When it happens

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